LCOV - code coverage report
Current view: top level - src/builtins - builtins-interpreter.cc (source / functions) Hit Total Coverage
Test: app.info Lines: 11 16 68.8 %
Date: 2017-10-20 Functions: 2 2 100.0 %

          Line data    Source code
       1             : // Copyright 2016 the V8 project authors. All rights reserved.
       2             : // Use of this source code is governed by a BSD-style license that can be
       3             : // found in the LICENSE file.
       4             : 
       5             : #include "src/builtins/builtins-utils.h"
       6             : #include "src/builtins/builtins.h"
       7             : #include "src/globals.h"
       8             : #include "src/handles-inl.h"
       9             : #include "src/objects-inl.h"
      10             : 
      11             : namespace v8 {
      12             : namespace internal {
      13             : 
      14         558 : Handle<Code> Builtins::InterpreterPushArgsThenCall(
      15             :     ConvertReceiverMode receiver_mode, InterpreterPushArgsMode mode) {
      16         558 :   switch (mode) {
      17             :     case InterpreterPushArgsMode::kJSFunction:
      18           0 :       switch (receiver_mode) {
      19             :         case ConvertReceiverMode::kNullOrUndefined:
      20             :           return builtin_handle(
      21           0 :               kInterpreterPushUndefinedAndArgsThenCallFunction);
      22             :         case ConvertReceiverMode::kNotNullOrUndefined:
      23             :         case ConvertReceiverMode::kAny:
      24           0 :           return builtin_handle(kInterpreterPushArgsThenCallFunction);
      25             :       }
      26             :     case InterpreterPushArgsMode::kWithFinalSpread:
      27          93 :       return builtin_handle(kInterpreterPushArgsThenCallWithFinalSpread);
      28             :     case InterpreterPushArgsMode::kOther:
      29         465 :       switch (receiver_mode) {
      30             :         case ConvertReceiverMode::kNullOrUndefined:
      31         186 :           return builtin_handle(kInterpreterPushUndefinedAndArgsThenCall);
      32             :         case ConvertReceiverMode::kNotNullOrUndefined:
      33             :         case ConvertReceiverMode::kAny:
      34         279 :           return builtin_handle(kInterpreterPushArgsThenCall);
      35             :       }
      36             :   }
      37           0 :   UNREACHABLE();
      38             : }
      39             : 
      40         279 : Handle<Code> Builtins::InterpreterPushArgsThenConstruct(
      41             :     InterpreterPushArgsMode mode) {
      42         279 :   switch (mode) {
      43             :     case InterpreterPushArgsMode::kJSFunction:
      44          93 :       return builtin_handle(kInterpreterPushArgsThenConstructFunction);
      45             :     case InterpreterPushArgsMode::kWithFinalSpread:
      46          93 :       return builtin_handle(kInterpreterPushArgsThenConstructWithFinalSpread);
      47             :     case InterpreterPushArgsMode::kOther:
      48          93 :       return builtin_handle(kInterpreterPushArgsThenConstruct);
      49             :   }
      50           0 :   UNREACHABLE();
      51             : }
      52             : 
      53             : }  // namespace internal
      54             : }  // namespace v8

Generated by: LCOV version 1.10