| 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 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 case OrdinaryToPrimitiveHint::kString: | 109 case OrdinaryToPrimitiveHint::kString: |
| 110 return OrdinaryToPrimitive_String(); | 110 return OrdinaryToPrimitive_String(); |
| 111 } | 111 } |
| 112 UNREACHABLE(); | 112 UNREACHABLE(); |
| 113 return Handle<Code>::null(); | 113 return Handle<Code>::null(); |
| 114 } | 114 } |
| 115 | 115 |
| 116 // static | 116 // static |
| 117 Callable Builtins::CallableFor(Isolate* isolate, Name name) { | 117 Callable Builtins::CallableFor(Isolate* isolate, Name name) { |
| 118 switch (name) { | 118 switch (name) { |
| 119 #define CASE(Name, ...) \ | 119 #define CASE(Name, ...) \ |
| 120 case k##Name: { \ | 120 case k##Name: { \ |
| 121 Handle<Code> code(Code::cast(isolate->builtins()->builtins_[name])); \ | 121 Handle<Code> code = isolate->builtins()->Name(); \ |
| 122 auto descriptor = Builtin_##Name##_InterfaceDescriptor(isolate); \ | 122 auto descriptor = Builtin_##Name##_InterfaceDescriptor(isolate); \ |
| 123 return Callable(code, descriptor); \ | 123 return Callable(code, descriptor); \ |
| 124 } | 124 } |
| 125 BUILTIN_LIST(IGNORE_BUILTIN, IGNORE_BUILTIN, IGNORE_BUILTIN, CASE, CASE, | 125 BUILTIN_LIST(IGNORE_BUILTIN, IGNORE_BUILTIN, IGNORE_BUILTIN, CASE, CASE, |
| 126 CASE, IGNORE_BUILTIN, IGNORE_BUILTIN) | 126 CASE, IGNORE_BUILTIN, IGNORE_BUILTIN) |
| 127 #undef CASE | 127 #undef CASE |
| 128 default: | 128 default: |
| 129 UNREACHABLE(); | 129 UNREACHABLE(); |
| 130 return Callable(Handle<Code>::null(), VoidDescriptor(isolate)); | 130 return Callable(Handle<Code>::null(), VoidDescriptor(isolate)); |
| 131 } | 131 } |
| 132 } | 132 } |
| 133 | 133 |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 233 // TODO(jochen): Remove this. | 233 // TODO(jochen): Remove this. |
| 234 if (responsible_context.is_null()) { | 234 if (responsible_context.is_null()) { |
| 235 return true; | 235 return true; |
| 236 } | 236 } |
| 237 if (*responsible_context == target->context()) return true; | 237 if (*responsible_context == target->context()) return true; |
| 238 return isolate->MayAccess(responsible_context, target_global_proxy); | 238 return isolate->MayAccess(responsible_context, target_global_proxy); |
| 239 } | 239 } |
| 240 | 240 |
| 241 } // namespace internal | 241 } // namespace internal |
| 242 } // namespace v8 | 242 } // namespace v8 |
| OLD | NEW |