Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(318)

Side by Side Diff: src/builtins/builtins.cc

Issue 2142933003: Move Error methods to C++ (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Handle exception in GetProperty Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/builtins/builtins.h ('k') | src/builtins/builtins-error.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « src/builtins/builtins.h ('k') | src/builtins/builtins-error.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698