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/builtins/builtins-utils.h" | 6 #include "src/builtins/builtins-utils.h" |
7 | 7 |
8 #include "src/api-arguments.h" | 8 #include "src/api-arguments.h" |
9 #include "src/api-natives.h" | 9 #include "src/api-natives.h" |
10 #include "src/code-factory.h" | 10 #include "src/code-factory.h" |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 "[Generator].prototype.return"); | 135 "[Generator].prototype.return"); |
136 } | 136 } |
137 | 137 |
138 // ES6 section 25.3.1.4 Generator.prototype.throw ( exception ) | 138 // ES6 section 25.3.1.4 Generator.prototype.throw ( exception ) |
139 void Builtins::Generate_GeneratorPrototypeThrow(CodeStubAssembler* assembler) { | 139 void Builtins::Generate_GeneratorPrototypeThrow(CodeStubAssembler* assembler) { |
140 Generate_GeneratorPrototypeResume(assembler, JSGeneratorObject::kThrow, | 140 Generate_GeneratorPrototypeResume(assembler, JSGeneratorObject::kThrow, |
141 "[Generator].prototype.throw"); | 141 "[Generator].prototype.throw"); |
142 } | 142 } |
143 | 143 |
144 // ----------------------------------------------------------------------------- | 144 // ----------------------------------------------------------------------------- |
| 145 |
145 // | 146 // |
146 | 147 |
147 namespace { | 148 namespace { |
148 | 149 |
149 // Returns the holder JSObject if the function can legally be called with this | 150 // Returns the holder JSObject if the function can legally be called with this |
150 // receiver. Returns nullptr if the call is illegal. | 151 // receiver. Returns nullptr if the call is illegal. |
151 // TODO(dcarney): CallOptimization duplicates this logic, merge. | 152 // TODO(dcarney): CallOptimization duplicates this logic, merge. |
152 JSObject* GetCompatibleReceiver(Isolate* isolate, FunctionTemplateInfo* info, | 153 JSObject* GetCompatibleReceiver(Isolate* isolate, FunctionTemplateInfo* info, |
153 JSObject* receiver) { | 154 JSObject* receiver) { |
154 Object* recv_type = info->signature(); | 155 Object* recv_type = info->signature(); |
(...skipping 1144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1299 #define DEFINE_BUILTIN_ACCESSOR(Name, ...) \ | 1300 #define DEFINE_BUILTIN_ACCESSOR(Name, ...) \ |
1300 Handle<Code> Builtins::Name() { \ | 1301 Handle<Code> Builtins::Name() { \ |
1301 Code** code_address = reinterpret_cast<Code**>(builtin_address(k##Name)); \ | 1302 Code** code_address = reinterpret_cast<Code**>(builtin_address(k##Name)); \ |
1302 return Handle<Code>(code_address); \ | 1303 return Handle<Code>(code_address); \ |
1303 } | 1304 } |
1304 BUILTIN_LIST_ALL(DEFINE_BUILTIN_ACCESSOR) | 1305 BUILTIN_LIST_ALL(DEFINE_BUILTIN_ACCESSOR) |
1305 #undef DEFINE_BUILTIN_ACCESSOR | 1306 #undef DEFINE_BUILTIN_ACCESSOR |
1306 | 1307 |
1307 } // namespace internal | 1308 } // namespace internal |
1308 } // namespace v8 | 1309 } // namespace v8 |
OLD | NEW |