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

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

Issue 1635553002: [Interpreter] Add native function literal support. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Add back some skips for Arm64 Created 4 years, 11 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/full-codegen/full-codegen.cc ('k') | test/cctest/cctest.status » ('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 1195 matching lines...) Expand 10 before | Expand all | Expand 10 after
1206 } 1206 }
1207 1207
1208 1208
1209 void BytecodeGenerator::VisitClassLiteral(ClassLiteral* expr) { 1209 void BytecodeGenerator::VisitClassLiteral(ClassLiteral* expr) {
1210 UNIMPLEMENTED(); 1210 UNIMPLEMENTED();
1211 } 1211 }
1212 1212
1213 1213
1214 void BytecodeGenerator::VisitNativeFunctionLiteral( 1214 void BytecodeGenerator::VisitNativeFunctionLiteral(
1215 NativeFunctionLiteral* expr) { 1215 NativeFunctionLiteral* expr) {
1216 UNIMPLEMENTED(); 1216 // Find or build a shared function info for the native function template.
1217 Handle<SharedFunctionInfo> shared_info =
1218 Compiler::GetSharedFunctionInfoForNative(expr->extension(), expr->name());
1219 builder()->CreateClosure(shared_info, NOT_TENURED);
1220 execution_result()->SetResultInAccumulator();
1217 } 1221 }
1218 1222
1219 1223
1220 void BytecodeGenerator::VisitDoExpression(DoExpression* expr) { 1224 void BytecodeGenerator::VisitDoExpression(DoExpression* expr) {
1221 UNIMPLEMENTED(); 1225 UNIMPLEMENTED();
1222 } 1226 }
1223 1227
1224 1228
1225 void BytecodeGenerator::VisitConditional(Conditional* expr) { 1229 void BytecodeGenerator::VisitConditional(Conditional* expr) {
1226 // TODO(rmcilroy): Spot easy cases where there code would not need to 1230 // TODO(rmcilroy): Spot easy cases where there code would not need to
(...skipping 1274 matching lines...) Expand 10 before | Expand all | Expand 10 after
2501 } 2505 }
2502 2506
2503 2507
2504 int BytecodeGenerator::feedback_index(FeedbackVectorSlot slot) const { 2508 int BytecodeGenerator::feedback_index(FeedbackVectorSlot slot) const {
2505 return info()->feedback_vector()->GetIndex(slot); 2509 return info()->feedback_vector()->GetIndex(slot);
2506 } 2510 }
2507 2511
2508 } // namespace interpreter 2512 } // namespace interpreter
2509 } // namespace internal 2513 } // namespace internal
2510 } // namespace v8 2514 } // namespace v8
OLDNEW
« no previous file with comments | « src/full-codegen/full-codegen.cc ('k') | test/cctest/cctest.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698