| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/builtins/builtins.h" | 5 #include "src/builtins/builtins.h" |
| 6 #include "src/api.h" | 6 #include "src/api.h" |
| 7 #include "src/assembler-inl.h" | 7 #include "src/assembler-inl.h" |
| 8 #include "src/builtins/builtins-descriptors.h" | 8 #include "src/builtins/builtins-descriptors.h" |
| 9 #include "src/callable.h" | 9 #include "src/callable.h" |
| 10 #include "src/isolate.h" | 10 #include "src/isolate.h" |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 | 117 |
| 118 // static | 118 // static |
| 119 int Builtins::GetBuiltinParameterCount(Name name) { | 119 int Builtins::GetBuiltinParameterCount(Name name) { |
| 120 switch (name) { | 120 switch (name) { |
| 121 #define TFJ_CASE(Name, ParamCount, ...) \ | 121 #define TFJ_CASE(Name, ParamCount, ...) \ |
| 122 case k##Name: { \ | 122 case k##Name: { \ |
| 123 return ParamCount; \ | 123 return ParamCount; \ |
| 124 } | 124 } |
| 125 BUILTIN_LIST(IGNORE_BUILTIN, IGNORE_BUILTIN, TFJ_CASE, IGNORE_BUILTIN, | 125 BUILTIN_LIST(IGNORE_BUILTIN, IGNORE_BUILTIN, TFJ_CASE, IGNORE_BUILTIN, |
| 126 IGNORE_BUILTIN, IGNORE_BUILTIN, IGNORE_BUILTIN, IGNORE_BUILTIN) | 126 IGNORE_BUILTIN, IGNORE_BUILTIN, IGNORE_BUILTIN, IGNORE_BUILTIN) |
| 127 #undef CASE | 127 #undef TFJ_CASE |
| 128 default: | 128 default: |
| 129 UNREACHABLE(); | 129 UNREACHABLE(); |
| 130 return 0; | 130 return 0; |
| 131 } | 131 } |
| 132 } | 132 } |
| 133 | 133 |
| 134 // static | 134 // static |
| 135 Callable Builtins::CallableFor(Isolate* isolate, Name name) { | 135 Callable Builtins::CallableFor(Isolate* isolate, Name name) { |
| 136 switch (name) { | 136 switch (name) { |
| 137 #define CASE(Name, ...) \ | 137 #define CASE(Name, ...) \ |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 255 // TODO(jochen): Remove this. | 255 // TODO(jochen): Remove this. |
| 256 if (responsible_context.is_null()) { | 256 if (responsible_context.is_null()) { |
| 257 return true; | 257 return true; |
| 258 } | 258 } |
| 259 if (*responsible_context == target->context()) return true; | 259 if (*responsible_context == target->context()) return true; |
| 260 return isolate->MayAccess(responsible_context, target_global_proxy); | 260 return isolate->MayAccess(responsible_context, target_global_proxy); |
| 261 } | 261 } |
| 262 | 262 |
| 263 } // namespace internal | 263 } // namespace internal |
| 264 } // namespace v8 | 264 } // namespace v8 |
| OLD | NEW |