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

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

Issue 1858773004: Revert of Correctly annotate eval origin. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 8 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/heap/heap.cc ('k') | src/isolate.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 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/bytecode-generator.h" 5 #include "src/interpreter/bytecode-generator.h"
6 6
7 #include "src/ast/scopes.h" 7 #include "src/ast/scopes.h"
8 #include "src/compiler.h" 8 #include "src/compiler.h"
9 #include "src/interpreter/bytecode-register-allocator.h" 9 #include "src/interpreter/bytecode-register-allocator.h"
10 #include "src/interpreter/control-flow-builders.h" 10 #include "src/interpreter/control-flow-builders.h"
(...skipping 2450 matching lines...) Expand 10 before | Expand all | Expand 10 after
2461 2461
2462 // Set up arguments for ResolvePossiblyDirectEval by copying callee, source 2462 // Set up arguments for ResolvePossiblyDirectEval by copying callee, source
2463 // strings and function closure, and loading language and 2463 // strings and function closure, and loading language and
2464 // position. 2464 // position.
2465 builder() 2465 builder()
2466 ->MoveRegister(callee, callee_for_eval) 2466 ->MoveRegister(callee, callee_for_eval)
2467 .MoveRegister(arg, source) 2467 .MoveRegister(arg, source)
2468 .MoveRegister(Register::function_closure(), function) 2468 .MoveRegister(Register::function_closure(), function)
2469 .LoadLiteral(Smi::FromInt(language_mode())) 2469 .LoadLiteral(Smi::FromInt(language_mode()))
2470 .StoreAccumulatorInRegister(language) 2470 .StoreAccumulatorInRegister(language)
2471 .LoadLiteral(Smi::FromInt(expr->position())) 2471 .LoadLiteral(
2472 Smi::FromInt(execution_context()->scope()->start_position()))
2472 .StoreAccumulatorInRegister(position); 2473 .StoreAccumulatorInRegister(position);
2473 2474
2474 // Call ResolvePossiblyDirectEval and modify the callee. 2475 // Call ResolvePossiblyDirectEval and modify the callee.
2475 builder() 2476 builder()
2476 ->CallRuntime(Runtime::kResolvePossiblyDirectEval, callee_for_eval, 5) 2477 ->CallRuntime(Runtime::kResolvePossiblyDirectEval, callee_for_eval, 5)
2477 .StoreAccumulatorInRegister(callee); 2478 .StoreAccumulatorInRegister(callee);
2478 } 2479 }
2479 2480
2480 builder()->SetExpressionPosition(expr); 2481 builder()->SetExpressionPosition(expr);
2481 builder()->Call(callee, receiver, 1 + args->length(), 2482 builder()->Call(callee, receiver, 1 + args->length(),
(...skipping 672 matching lines...) Expand 10 before | Expand all | Expand 10 after
3154 } 3155 }
3155 3156
3156 3157
3157 int BytecodeGenerator::feedback_index(FeedbackVectorSlot slot) const { 3158 int BytecodeGenerator::feedback_index(FeedbackVectorSlot slot) const {
3158 return info()->feedback_vector()->GetIndex(slot); 3159 return info()->feedback_vector()->GetIndex(slot);
3159 } 3160 }
3160 3161
3161 } // namespace interpreter 3162 } // namespace interpreter
3162 } // namespace internal 3163 } // namespace internal
3163 } // namespace v8 3164 } // namespace v8
OLDNEW
« no previous file with comments | « src/heap/heap.cc ('k') | src/isolate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698