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

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

Issue 1469303006: Revert of Reland "[Interpreter] Add CreateClosure to BytecodeGraphBuilder." (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years 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/bytecode-array-builder.cc ('k') | src/interpreter/bytecodes.h » ('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/compiler.h" 7 #include "src/compiler.h"
8 #include "src/interpreter/control-flow-builders.h" 8 #include "src/interpreter/control-flow-builders.h"
9 #include "src/objects.h" 9 #include "src/objects.h"
10 #include "src/parser.h" 10 #include "src/parser.h"
(...skipping 953 matching lines...) Expand 10 before | Expand all | Expand 10 after
964 void BytecodeGenerator::VisitDebuggerStatement(DebuggerStatement* stmt) { 964 void BytecodeGenerator::VisitDebuggerStatement(DebuggerStatement* stmt) {
965 UNIMPLEMENTED(); 965 UNIMPLEMENTED();
966 } 966 }
967 967
968 968
969 void BytecodeGenerator::VisitFunctionLiteral(FunctionLiteral* expr) { 969 void BytecodeGenerator::VisitFunctionLiteral(FunctionLiteral* expr) {
970 // Find or build a shared function info. 970 // Find or build a shared function info.
971 Handle<SharedFunctionInfo> shared_info = 971 Handle<SharedFunctionInfo> shared_info =
972 Compiler::GetSharedFunctionInfo(expr, info()->script(), info()); 972 Compiler::GetSharedFunctionInfo(expr, info()->script(), info());
973 CHECK(!shared_info.is_null()); // TODO(rmcilroy): Set stack overflow? 973 CHECK(!shared_info.is_null()); // TODO(rmcilroy): Set stack overflow?
974 builder()->CreateClosure(shared_info, 974
975 expr->pretenure() ? TENURED : NOT_TENURED); 975 builder()
976 ->LoadLiteral(shared_info)
977 .CreateClosure(expr->pretenure() ? TENURED : NOT_TENURED);
976 execution_result()->SetResultInAccumulator(); 978 execution_result()->SetResultInAccumulator();
977 } 979 }
978 980
979 981
980 void BytecodeGenerator::VisitClassLiteral(ClassLiteral* expr) { 982 void BytecodeGenerator::VisitClassLiteral(ClassLiteral* expr) {
981 UNIMPLEMENTED(); 983 UNIMPLEMENTED();
982 } 984 }
983 985
984 986
985 void BytecodeGenerator::VisitNativeFunctionLiteral( 987 void BytecodeGenerator::VisitNativeFunctionLiteral(
(...skipping 1242 matching lines...) Expand 10 before | Expand all | Expand 10 after
2228 } 2230 }
2229 2231
2230 2232
2231 int BytecodeGenerator::feedback_index(FeedbackVectorSlot slot) const { 2233 int BytecodeGenerator::feedback_index(FeedbackVectorSlot slot) const {
2232 return info()->feedback_vector()->GetIndex(slot); 2234 return info()->feedback_vector()->GetIndex(slot);
2233 } 2235 }
2234 2236
2235 } // namespace interpreter 2237 } // namespace interpreter
2236 } // namespace internal 2238 } // namespace internal
2237 } // namespace v8 2239 } // namespace v8
OLDNEW
« no previous file with comments | « src/interpreter/bytecode-array-builder.cc ('k') | src/interpreter/bytecodes.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698