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

Side by Side Diff: src/interpreter/interpreter-intrinsics-generator.cc

Issue 2861983002: [ignition] Optimize JSGenerator creation (Closed)
Patch Set: rebase Created 3 years, 7 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/interpreter/interpreter-intrinsics.h ('k') | src/parsing/parser.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 2017 the V8 project authors. All rights reserved. 1 // Copyright 2017 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/interpreter/interpreter-intrinsics-generator.h" 5 #include "src/interpreter/interpreter-intrinsics-generator.h"
6 6
7 #include "src/allocation.h" 7 #include "src/allocation.h"
8 #include "src/builtins/builtins.h" 8 #include "src/builtins/builtins.h"
9 #include "src/code-factory.h" 9 #include "src/code-factory.h"
10 #include "src/frames.h" 10 #include "src/frames.h"
(...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after
362 Node* generator = __ LoadRegister(args_reg); 362 Node* generator = __ LoadRegister(args_reg);
363 CSA_SLOW_ASSERT(assembler_, __ HasInstanceType( 363 CSA_SLOW_ASSERT(assembler_, __ HasInstanceType(
364 generator, JS_ASYNC_GENERATOR_OBJECT_TYPE)); 364 generator, JS_ASYNC_GENERATOR_OBJECT_TYPE));
365 365
366 Node* const value = __ LoadObjectField( 366 Node* const value = __ LoadObjectField(
367 generator, JSAsyncGeneratorObject::kAwaitInputOrDebugPosOffset); 367 generator, JSAsyncGeneratorObject::kAwaitInputOrDebugPosOffset);
368 368
369 return value; 369 return value;
370 } 370 }
371 371
372 Node* IntrinsicsGenerator::CreateJSGeneratorObject(Node* input, Node* arg_count,
373 Node* context) {
374 return IntrinsicAsBuiltinCall(input, context,
375 Builtins::kCreateGeneratorObject);
376 }
377
372 Node* IntrinsicsGenerator::AsyncGeneratorReject(Node* input, Node* arg_count, 378 Node* IntrinsicsGenerator::AsyncGeneratorReject(Node* input, Node* arg_count,
373 Node* context) { 379 Node* context) {
374 return IntrinsicAsBuiltinCall(input, context, 380 return IntrinsicAsBuiltinCall(input, context,
375 Builtins::kAsyncGeneratorReject); 381 Builtins::kAsyncGeneratorReject);
376 } 382 }
377 383
378 Node* IntrinsicsGenerator::AsyncGeneratorResolve(Node* input, Node* arg_count, 384 Node* IntrinsicsGenerator::AsyncGeneratorResolve(Node* input, Node* arg_count,
379 Node* context) { 385 Node* context) {
380 return IntrinsicAsBuiltinCall(input, context, 386 return IntrinsicAsBuiltinCall(input, context,
381 Builtins::kAsyncGeneratorResolve); 387 Builtins::kAsyncGeneratorResolve);
382 } 388 }
383 389
384 void IntrinsicsGenerator::AbortIfArgCountMismatch(int expected, Node* actual) { 390 void IntrinsicsGenerator::AbortIfArgCountMismatch(int expected, Node* actual) {
385 InterpreterAssembler::Label match(assembler_); 391 InterpreterAssembler::Label match(assembler_);
386 Node* comparison = __ Word32Equal(actual, __ Int32Constant(expected)); 392 Node* comparison = __ Word32Equal(actual, __ Int32Constant(expected));
387 __ GotoIf(comparison, &match); 393 __ GotoIf(comparison, &match);
388 __ Abort(kWrongArgumentCountForInvokeIntrinsic); 394 __ Abort(kWrongArgumentCountForInvokeIntrinsic);
389 __ Goto(&match); 395 __ Goto(&match);
390 __ Bind(&match); 396 __ Bind(&match);
391 } 397 }
392 398
393 } // namespace interpreter 399 } // namespace interpreter
394 } // namespace internal 400 } // namespace internal
395 } // namespace v8 401 } // namespace v8
OLDNEW
« no previous file with comments | « src/interpreter/interpreter-intrinsics.h ('k') | src/parsing/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698