| OLD | NEW |
| 1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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.h" | 5 #include "src/interpreter/interpreter.h" |
| 6 | 6 |
| 7 #include <fstream> | 7 #include <fstream> |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "src/ast/prettyprinter.h" | 10 #include "src/ast/prettyprinter.h" |
| (...skipping 2333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2344 } | 2344 } |
| 2345 | 2345 |
| 2346 __ Bind(&end); | 2346 __ Bind(&end); |
| 2347 __ Dispatch(); | 2347 __ Dispatch(); |
| 2348 } | 2348 } |
| 2349 | 2349 |
| 2350 // Jump <imm> | 2350 // Jump <imm> |
| 2351 // | 2351 // |
| 2352 // Jump by number of bytes represented by the immediate operand |imm|. | 2352 // Jump by number of bytes represented by the immediate operand |imm|. |
| 2353 void Interpreter::DoJump(InterpreterAssembler* assembler) { | 2353 void Interpreter::DoJump(InterpreterAssembler* assembler) { |
| 2354 Node* relative_jump = __ BytecodeOperandImmIntPtr(0); | 2354 Node* relative_jump = __ BytecodeOperandUImmWord(0); |
| 2355 __ Jump(relative_jump); | 2355 __ Jump(relative_jump); |
| 2356 } | 2356 } |
| 2357 | 2357 |
| 2358 // JumpConstant <idx> | 2358 // JumpConstant <idx> |
| 2359 // | 2359 // |
| 2360 // Jump by number of bytes in the Smi in the |idx| entry in the constant pool. | 2360 // Jump by number of bytes in the Smi in the |idx| entry in the constant pool. |
| 2361 void Interpreter::DoJumpConstant(InterpreterAssembler* assembler) { | 2361 void Interpreter::DoJumpConstant(InterpreterAssembler* assembler) { |
| 2362 Node* index = __ BytecodeOperandIdx(0); | 2362 Node* index = __ BytecodeOperandIdx(0); |
| 2363 Node* relative_jump = __ LoadAndUntagConstantPoolEntry(index); | 2363 Node* relative_jump = __ LoadAndUntagConstantPoolEntry(index); |
| 2364 __ Jump(relative_jump); | 2364 __ Jump(relative_jump); |
| 2365 } | 2365 } |
| 2366 | 2366 |
| 2367 // JumpIfTrue <imm> | 2367 // JumpIfTrue <imm> |
| 2368 // | 2368 // |
| 2369 // Jump by number of bytes represented by an immediate operand if the | 2369 // Jump by number of bytes represented by an immediate operand if the |
| 2370 // accumulator contains true. | 2370 // accumulator contains true. |
| 2371 void Interpreter::DoJumpIfTrue(InterpreterAssembler* assembler) { | 2371 void Interpreter::DoJumpIfTrue(InterpreterAssembler* assembler) { |
| 2372 Node* accumulator = __ GetAccumulator(); | 2372 Node* accumulator = __ GetAccumulator(); |
| 2373 Node* relative_jump = __ BytecodeOperandImmIntPtr(0); | 2373 Node* relative_jump = __ BytecodeOperandUImmWord(0); |
| 2374 Node* true_value = __ BooleanConstant(true); | 2374 Node* true_value = __ BooleanConstant(true); |
| 2375 __ JumpIfWordEqual(accumulator, true_value, relative_jump); | 2375 __ JumpIfWordEqual(accumulator, true_value, relative_jump); |
| 2376 } | 2376 } |
| 2377 | 2377 |
| 2378 // JumpIfTrueConstant <idx> | 2378 // JumpIfTrueConstant <idx> |
| 2379 // | 2379 // |
| 2380 // Jump by number of bytes in the Smi in the |idx| entry in the constant pool | 2380 // Jump by number of bytes in the Smi in the |idx| entry in the constant pool |
| 2381 // if the accumulator contains true. | 2381 // if the accumulator contains true. |
| 2382 void Interpreter::DoJumpIfTrueConstant(InterpreterAssembler* assembler) { | 2382 void Interpreter::DoJumpIfTrueConstant(InterpreterAssembler* assembler) { |
| 2383 Node* accumulator = __ GetAccumulator(); | 2383 Node* accumulator = __ GetAccumulator(); |
| 2384 Node* index = __ BytecodeOperandIdx(0); | 2384 Node* index = __ BytecodeOperandIdx(0); |
| 2385 Node* relative_jump = __ LoadAndUntagConstantPoolEntry(index); | 2385 Node* relative_jump = __ LoadAndUntagConstantPoolEntry(index); |
| 2386 Node* true_value = __ BooleanConstant(true); | 2386 Node* true_value = __ BooleanConstant(true); |
| 2387 __ JumpIfWordEqual(accumulator, true_value, relative_jump); | 2387 __ JumpIfWordEqual(accumulator, true_value, relative_jump); |
| 2388 } | 2388 } |
| 2389 | 2389 |
| 2390 // JumpIfFalse <imm> | 2390 // JumpIfFalse <imm> |
| 2391 // | 2391 // |
| 2392 // Jump by number of bytes represented by an immediate operand if the | 2392 // Jump by number of bytes represented by an immediate operand if the |
| 2393 // accumulator contains false. | 2393 // accumulator contains false. |
| 2394 void Interpreter::DoJumpIfFalse(InterpreterAssembler* assembler) { | 2394 void Interpreter::DoJumpIfFalse(InterpreterAssembler* assembler) { |
| 2395 Node* accumulator = __ GetAccumulator(); | 2395 Node* accumulator = __ GetAccumulator(); |
| 2396 Node* relative_jump = __ BytecodeOperandImmIntPtr(0); | 2396 Node* relative_jump = __ BytecodeOperandUImmWord(0); |
| 2397 Node* false_value = __ BooleanConstant(false); | 2397 Node* false_value = __ BooleanConstant(false); |
| 2398 __ JumpIfWordEqual(accumulator, false_value, relative_jump); | 2398 __ JumpIfWordEqual(accumulator, false_value, relative_jump); |
| 2399 } | 2399 } |
| 2400 | 2400 |
| 2401 // JumpIfFalseConstant <idx> | 2401 // JumpIfFalseConstant <idx> |
| 2402 // | 2402 // |
| 2403 // Jump by number of bytes in the Smi in the |idx| entry in the constant pool | 2403 // Jump by number of bytes in the Smi in the |idx| entry in the constant pool |
| 2404 // if the accumulator contains false. | 2404 // if the accumulator contains false. |
| 2405 void Interpreter::DoJumpIfFalseConstant(InterpreterAssembler* assembler) { | 2405 void Interpreter::DoJumpIfFalseConstant(InterpreterAssembler* assembler) { |
| 2406 Node* accumulator = __ GetAccumulator(); | 2406 Node* accumulator = __ GetAccumulator(); |
| 2407 Node* index = __ BytecodeOperandIdx(0); | 2407 Node* index = __ BytecodeOperandIdx(0); |
| 2408 Node* relative_jump = __ LoadAndUntagConstantPoolEntry(index); | 2408 Node* relative_jump = __ LoadAndUntagConstantPoolEntry(index); |
| 2409 Node* false_value = __ BooleanConstant(false); | 2409 Node* false_value = __ BooleanConstant(false); |
| 2410 __ JumpIfWordEqual(accumulator, false_value, relative_jump); | 2410 __ JumpIfWordEqual(accumulator, false_value, relative_jump); |
| 2411 } | 2411 } |
| 2412 | 2412 |
| 2413 // JumpIfToBooleanTrue <imm> | 2413 // JumpIfToBooleanTrue <imm> |
| 2414 // | 2414 // |
| 2415 // Jump by number of bytes represented by an immediate operand if the object | 2415 // Jump by number of bytes represented by an immediate operand if the object |
| 2416 // referenced by the accumulator is true when the object is cast to boolean. | 2416 // referenced by the accumulator is true when the object is cast to boolean. |
| 2417 void Interpreter::DoJumpIfToBooleanTrue(InterpreterAssembler* assembler) { | 2417 void Interpreter::DoJumpIfToBooleanTrue(InterpreterAssembler* assembler) { |
| 2418 Node* value = __ GetAccumulator(); | 2418 Node* value = __ GetAccumulator(); |
| 2419 Node* relative_jump = __ BytecodeOperandImmIntPtr(0); | 2419 Node* relative_jump = __ BytecodeOperandUImmWord(0); |
| 2420 Label if_true(assembler), if_false(assembler); | 2420 Label if_true(assembler), if_false(assembler); |
| 2421 __ BranchIfToBooleanIsTrue(value, &if_true, &if_false); | 2421 __ BranchIfToBooleanIsTrue(value, &if_true, &if_false); |
| 2422 __ Bind(&if_true); | 2422 __ Bind(&if_true); |
| 2423 __ Jump(relative_jump); | 2423 __ Jump(relative_jump); |
| 2424 __ Bind(&if_false); | 2424 __ Bind(&if_false); |
| 2425 __ Dispatch(); | 2425 __ Dispatch(); |
| 2426 } | 2426 } |
| 2427 | 2427 |
| 2428 // JumpIfToBooleanTrueConstant <idx> | 2428 // JumpIfToBooleanTrueConstant <idx> |
| 2429 // | 2429 // |
| (...skipping 12 matching lines...) Expand all Loading... |
| 2442 __ Bind(&if_false); | 2442 __ Bind(&if_false); |
| 2443 __ Dispatch(); | 2443 __ Dispatch(); |
| 2444 } | 2444 } |
| 2445 | 2445 |
| 2446 // JumpIfToBooleanFalse <imm> | 2446 // JumpIfToBooleanFalse <imm> |
| 2447 // | 2447 // |
| 2448 // Jump by number of bytes represented by an immediate operand if the object | 2448 // Jump by number of bytes represented by an immediate operand if the object |
| 2449 // referenced by the accumulator is false when the object is cast to boolean. | 2449 // referenced by the accumulator is false when the object is cast to boolean. |
| 2450 void Interpreter::DoJumpIfToBooleanFalse(InterpreterAssembler* assembler) { | 2450 void Interpreter::DoJumpIfToBooleanFalse(InterpreterAssembler* assembler) { |
| 2451 Node* value = __ GetAccumulator(); | 2451 Node* value = __ GetAccumulator(); |
| 2452 Node* relative_jump = __ BytecodeOperandImmIntPtr(0); | 2452 Node* relative_jump = __ BytecodeOperandUImmWord(0); |
| 2453 Label if_true(assembler), if_false(assembler); | 2453 Label if_true(assembler), if_false(assembler); |
| 2454 __ BranchIfToBooleanIsTrue(value, &if_true, &if_false); | 2454 __ BranchIfToBooleanIsTrue(value, &if_true, &if_false); |
| 2455 __ Bind(&if_true); | 2455 __ Bind(&if_true); |
| 2456 __ Dispatch(); | 2456 __ Dispatch(); |
| 2457 __ Bind(&if_false); | 2457 __ Bind(&if_false); |
| 2458 __ Jump(relative_jump); | 2458 __ Jump(relative_jump); |
| 2459 } | 2459 } |
| 2460 | 2460 |
| 2461 // JumpIfToBooleanFalseConstant <idx> | 2461 // JumpIfToBooleanFalseConstant <idx> |
| 2462 // | 2462 // |
| (...skipping 13 matching lines...) Expand all Loading... |
| 2476 __ Jump(relative_jump); | 2476 __ Jump(relative_jump); |
| 2477 } | 2477 } |
| 2478 | 2478 |
| 2479 // JumpIfNull <imm> | 2479 // JumpIfNull <imm> |
| 2480 // | 2480 // |
| 2481 // Jump by number of bytes represented by an immediate operand if the object | 2481 // Jump by number of bytes represented by an immediate operand if the object |
| 2482 // referenced by the accumulator is the null constant. | 2482 // referenced by the accumulator is the null constant. |
| 2483 void Interpreter::DoJumpIfNull(InterpreterAssembler* assembler) { | 2483 void Interpreter::DoJumpIfNull(InterpreterAssembler* assembler) { |
| 2484 Node* accumulator = __ GetAccumulator(); | 2484 Node* accumulator = __ GetAccumulator(); |
| 2485 Node* null_value = __ HeapConstant(isolate_->factory()->null_value()); | 2485 Node* null_value = __ HeapConstant(isolate_->factory()->null_value()); |
| 2486 Node* relative_jump = __ BytecodeOperandImmIntPtr(0); | 2486 Node* relative_jump = __ BytecodeOperandUImmWord(0); |
| 2487 __ JumpIfWordEqual(accumulator, null_value, relative_jump); | 2487 __ JumpIfWordEqual(accumulator, null_value, relative_jump); |
| 2488 } | 2488 } |
| 2489 | 2489 |
| 2490 // JumpIfNullConstant <idx> | 2490 // JumpIfNullConstant <idx> |
| 2491 // | 2491 // |
| 2492 // Jump by number of bytes in the Smi in the |idx| entry in the constant pool | 2492 // Jump by number of bytes in the Smi in the |idx| entry in the constant pool |
| 2493 // if the object referenced by the accumulator is the null constant. | 2493 // if the object referenced by the accumulator is the null constant. |
| 2494 void Interpreter::DoJumpIfNullConstant(InterpreterAssembler* assembler) { | 2494 void Interpreter::DoJumpIfNullConstant(InterpreterAssembler* assembler) { |
| 2495 Node* accumulator = __ GetAccumulator(); | 2495 Node* accumulator = __ GetAccumulator(); |
| 2496 Node* null_value = __ HeapConstant(isolate_->factory()->null_value()); | 2496 Node* null_value = __ HeapConstant(isolate_->factory()->null_value()); |
| 2497 Node* index = __ BytecodeOperandIdx(0); | 2497 Node* index = __ BytecodeOperandIdx(0); |
| 2498 Node* relative_jump = __ LoadAndUntagConstantPoolEntry(index); | 2498 Node* relative_jump = __ LoadAndUntagConstantPoolEntry(index); |
| 2499 __ JumpIfWordEqual(accumulator, null_value, relative_jump); | 2499 __ JumpIfWordEqual(accumulator, null_value, relative_jump); |
| 2500 } | 2500 } |
| 2501 | 2501 |
| 2502 // JumpIfUndefined <imm> | 2502 // JumpIfUndefined <imm> |
| 2503 // | 2503 // |
| 2504 // Jump by number of bytes represented by an immediate operand if the object | 2504 // Jump by number of bytes represented by an immediate operand if the object |
| 2505 // referenced by the accumulator is the undefined constant. | 2505 // referenced by the accumulator is the undefined constant. |
| 2506 void Interpreter::DoJumpIfUndefined(InterpreterAssembler* assembler) { | 2506 void Interpreter::DoJumpIfUndefined(InterpreterAssembler* assembler) { |
| 2507 Node* accumulator = __ GetAccumulator(); | 2507 Node* accumulator = __ GetAccumulator(); |
| 2508 Node* undefined_value = | 2508 Node* undefined_value = |
| 2509 __ HeapConstant(isolate_->factory()->undefined_value()); | 2509 __ HeapConstant(isolate_->factory()->undefined_value()); |
| 2510 Node* relative_jump = __ BytecodeOperandImmIntPtr(0); | 2510 Node* relative_jump = __ BytecodeOperandUImmWord(0); |
| 2511 __ JumpIfWordEqual(accumulator, undefined_value, relative_jump); | 2511 __ JumpIfWordEqual(accumulator, undefined_value, relative_jump); |
| 2512 } | 2512 } |
| 2513 | 2513 |
| 2514 // JumpIfUndefinedConstant <idx> | 2514 // JumpIfUndefinedConstant <idx> |
| 2515 // | 2515 // |
| 2516 // Jump by number of bytes in the Smi in the |idx| entry in the constant pool | 2516 // Jump by number of bytes in the Smi in the |idx| entry in the constant pool |
| 2517 // if the object referenced by the accumulator is the undefined constant. | 2517 // if the object referenced by the accumulator is the undefined constant. |
| 2518 void Interpreter::DoJumpIfUndefinedConstant(InterpreterAssembler* assembler) { | 2518 void Interpreter::DoJumpIfUndefinedConstant(InterpreterAssembler* assembler) { |
| 2519 Node* accumulator = __ GetAccumulator(); | 2519 Node* accumulator = __ GetAccumulator(); |
| 2520 Node* undefined_value = | 2520 Node* undefined_value = |
| 2521 __ HeapConstant(isolate_->factory()->undefined_value()); | 2521 __ HeapConstant(isolate_->factory()->undefined_value()); |
| 2522 Node* index = __ BytecodeOperandIdx(0); | 2522 Node* index = __ BytecodeOperandIdx(0); |
| 2523 Node* relative_jump = __ LoadAndUntagConstantPoolEntry(index); | 2523 Node* relative_jump = __ LoadAndUntagConstantPoolEntry(index); |
| 2524 __ JumpIfWordEqual(accumulator, undefined_value, relative_jump); | 2524 __ JumpIfWordEqual(accumulator, undefined_value, relative_jump); |
| 2525 } | 2525 } |
| 2526 | 2526 |
| 2527 // JumpIfJSReceiver <imm> | 2527 // JumpIfJSReceiver <imm> |
| 2528 // | 2528 // |
| 2529 // Jump by number of bytes represented by an immediate operand if the object | 2529 // Jump by number of bytes represented by an immediate operand if the object |
| 2530 // referenced by the accumulator is a JSReceiver. | 2530 // referenced by the accumulator is a JSReceiver. |
| 2531 void Interpreter::DoJumpIfJSReceiver(InterpreterAssembler* assembler) { | 2531 void Interpreter::DoJumpIfJSReceiver(InterpreterAssembler* assembler) { |
| 2532 Node* accumulator = __ GetAccumulator(); | 2532 Node* accumulator = __ GetAccumulator(); |
| 2533 Node* relative_jump = __ BytecodeOperandImmIntPtr(0); | 2533 Node* relative_jump = __ BytecodeOperandUImmWord(0); |
| 2534 | 2534 |
| 2535 Label if_object(assembler), if_notobject(assembler, Label::kDeferred), | 2535 Label if_object(assembler), if_notobject(assembler, Label::kDeferred), |
| 2536 if_notsmi(assembler); | 2536 if_notsmi(assembler); |
| 2537 __ Branch(__ TaggedIsSmi(accumulator), &if_notobject, &if_notsmi); | 2537 __ Branch(__ TaggedIsSmi(accumulator), &if_notobject, &if_notsmi); |
| 2538 | 2538 |
| 2539 __ Bind(&if_notsmi); | 2539 __ Bind(&if_notsmi); |
| 2540 __ Branch(__ IsJSReceiver(accumulator), &if_object, &if_notobject); | 2540 __ Branch(__ IsJSReceiver(accumulator), &if_object, &if_notobject); |
| 2541 __ Bind(&if_object); | 2541 __ Bind(&if_object); |
| 2542 __ Jump(relative_jump); | 2542 __ Jump(relative_jump); |
| 2543 | 2543 |
| (...skipping 23 matching lines...) Expand all Loading... |
| 2567 __ Dispatch(); | 2567 __ Dispatch(); |
| 2568 } | 2568 } |
| 2569 | 2569 |
| 2570 // JumpIfNotHole <imm> | 2570 // JumpIfNotHole <imm> |
| 2571 // | 2571 // |
| 2572 // Jump by number of bytes represented by an immediate operand if the object | 2572 // Jump by number of bytes represented by an immediate operand if the object |
| 2573 // referenced by the accumulator is the hole. | 2573 // referenced by the accumulator is the hole. |
| 2574 void Interpreter::DoJumpIfNotHole(InterpreterAssembler* assembler) { | 2574 void Interpreter::DoJumpIfNotHole(InterpreterAssembler* assembler) { |
| 2575 Node* accumulator = __ GetAccumulator(); | 2575 Node* accumulator = __ GetAccumulator(); |
| 2576 Node* the_hole_value = __ HeapConstant(isolate_->factory()->the_hole_value()); | 2576 Node* the_hole_value = __ HeapConstant(isolate_->factory()->the_hole_value()); |
| 2577 Node* relative_jump = __ BytecodeOperandImmIntPtr(0); | 2577 Node* relative_jump = __ BytecodeOperandUImmWord(0); |
| 2578 __ JumpIfWordNotEqual(accumulator, the_hole_value, relative_jump); | 2578 __ JumpIfWordNotEqual(accumulator, the_hole_value, relative_jump); |
| 2579 } | 2579 } |
| 2580 | 2580 |
| 2581 // JumpIfNotHoleConstant <idx> | 2581 // JumpIfNotHoleConstant <idx> |
| 2582 // | 2582 // |
| 2583 // Jump by number of bytes in the Smi in the |idx| entry in the constant pool | 2583 // Jump by number of bytes in the Smi in the |idx| entry in the constant pool |
| 2584 // if the object referenced by the accumulator is the hole constant. | 2584 // if the object referenced by the accumulator is the hole constant. |
| 2585 void Interpreter::DoJumpIfNotHoleConstant(InterpreterAssembler* assembler) { | 2585 void Interpreter::DoJumpIfNotHoleConstant(InterpreterAssembler* assembler) { |
| 2586 Node* accumulator = __ GetAccumulator(); | 2586 Node* accumulator = __ GetAccumulator(); |
| 2587 Node* the_hole_value = __ HeapConstant(isolate_->factory()->the_hole_value()); | 2587 Node* the_hole_value = __ HeapConstant(isolate_->factory()->the_hole_value()); |
| 2588 Node* index = __ BytecodeOperandIdx(0); | 2588 Node* index = __ BytecodeOperandIdx(0); |
| 2589 Node* relative_jump = __ LoadAndUntagConstantPoolEntry(index); | 2589 Node* relative_jump = __ LoadAndUntagConstantPoolEntry(index); |
| 2590 __ JumpIfWordNotEqual(accumulator, the_hole_value, relative_jump); | 2590 __ JumpIfWordNotEqual(accumulator, the_hole_value, relative_jump); |
| 2591 } | 2591 } |
| 2592 | 2592 |
| 2593 // JumpLoop <imm> <loop_depth> | 2593 // JumpLoop <imm> <loop_depth> |
| 2594 // | 2594 // |
| 2595 // Jump by number of bytes represented by the immediate operand |imm|. Also | 2595 // Jump by number of bytes represented by the immediate operand |imm|. Also |
| 2596 // performs a loop nesting check and potentially triggers OSR in case the | 2596 // performs a loop nesting check and potentially triggers OSR in case the |
| 2597 // current OSR level matches (or exceeds) the specified |loop_depth|. | 2597 // current OSR level matches (or exceeds) the specified |loop_depth|. |
| 2598 void Interpreter::DoJumpLoop(InterpreterAssembler* assembler) { | 2598 void Interpreter::DoJumpLoop(InterpreterAssembler* assembler) { |
| 2599 Node* relative_jump = __ BytecodeOperandImmIntPtr(0); | 2599 Node* relative_jump = __ BytecodeOperandUImmWord(0); |
| 2600 Node* loop_depth = __ BytecodeOperandImm(1); | 2600 Node* loop_depth = __ BytecodeOperandImm(1); |
| 2601 Node* osr_level = __ LoadOSRNestingLevel(); | 2601 Node* osr_level = __ LoadOSRNestingLevel(); |
| 2602 | 2602 |
| 2603 // Check if OSR points at the given {loop_depth} are armed by comparing it to | 2603 // Check if OSR points at the given {loop_depth} are armed by comparing it to |
| 2604 // the current {osr_level} loaded from the header of the BytecodeArray. | 2604 // the current {osr_level} loaded from the header of the BytecodeArray. |
| 2605 Label ok(assembler), osr_armed(assembler, Label::kDeferred); | 2605 Label ok(assembler), osr_armed(assembler, Label::kDeferred); |
| 2606 Node* condition = __ Int32GreaterThanOrEqual(loop_depth, osr_level); | 2606 Node* condition = __ Int32GreaterThanOrEqual(loop_depth, osr_level); |
| 2607 __ Branch(condition, &ok, &osr_armed); | 2607 __ Branch(condition, &ok, &osr_armed); |
| 2608 | 2608 |
| 2609 __ Bind(&ok); | 2609 __ Bind(&ok); |
| 2610 __ Jump(relative_jump); | 2610 __ Jump(relative_jump, true); |
| 2611 | 2611 |
| 2612 __ Bind(&osr_armed); | 2612 __ Bind(&osr_armed); |
| 2613 { | 2613 { |
| 2614 Callable callable = CodeFactory::InterpreterOnStackReplacement(isolate_); | 2614 Callable callable = CodeFactory::InterpreterOnStackReplacement(isolate_); |
| 2615 Node* target = __ HeapConstant(callable.code()); | 2615 Node* target = __ HeapConstant(callable.code()); |
| 2616 Node* context = __ GetContext(); | 2616 Node* context = __ GetContext(); |
| 2617 __ CallStub(callable.descriptor(), target, context); | 2617 __ CallStub(callable.descriptor(), target, context); |
| 2618 __ Jump(relative_jump); | 2618 __ Jump(relative_jump, true); |
| 2619 } | 2619 } |
| 2620 } | 2620 } |
| 2621 | 2621 |
| 2622 // CreateRegExpLiteral <pattern_idx> <literal_idx> <flags> | 2622 // CreateRegExpLiteral <pattern_idx> <literal_idx> <flags> |
| 2623 // | 2623 // |
| 2624 // Creates a regular expression literal for literal index <literal_idx> with | 2624 // Creates a regular expression literal for literal index <literal_idx> with |
| 2625 // <flags> and the pattern in <pattern_idx>. | 2625 // <flags> and the pattern in <pattern_idx>. |
| 2626 void Interpreter::DoCreateRegExpLiteral(InterpreterAssembler* assembler) { | 2626 void Interpreter::DoCreateRegExpLiteral(InterpreterAssembler* assembler) { |
| 2627 Node* index = __ BytecodeOperandIdx(0); | 2627 Node* index = __ BytecodeOperandIdx(0); |
| 2628 Node* pattern = __ LoadConstantPoolEntry(index); | 2628 Node* pattern = __ LoadConstantPoolEntry(index); |
| (...skipping 630 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3259 __ StoreObjectField(generator, JSGeneratorObject::kContinuationOffset, | 3259 __ StoreObjectField(generator, JSGeneratorObject::kContinuationOffset, |
| 3260 __ SmiTag(new_state)); | 3260 __ SmiTag(new_state)); |
| 3261 __ SetAccumulator(old_state); | 3261 __ SetAccumulator(old_state); |
| 3262 | 3262 |
| 3263 __ Dispatch(); | 3263 __ Dispatch(); |
| 3264 } | 3264 } |
| 3265 | 3265 |
| 3266 } // namespace interpreter | 3266 } // namespace interpreter |
| 3267 } // namespace internal | 3267 } // namespace internal |
| 3268 } // namespace v8 | 3268 } // namespace v8 |
| OLD | NEW |