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

Side by Side Diff: src/full-codegen/full-codegen.cc

Issue 2207553002: [stubs] Turn FastCloneRegExpStub into a TurboFan code stub. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix indexing. Created 4 years, 4 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/deoptimize-reason.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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/full-codegen/full-codegen.h" 5 #include "src/full-codegen/full-codegen.h"
6 6
7 #include "src/ast/ast-numbering.h" 7 #include "src/ast/ast-numbering.h"
8 #include "src/ast/ast.h" 8 #include "src/ast/ast.h"
9 #include "src/ast/prettyprinter.h" 9 #include "src/ast/prettyprinter.h"
10 #include "src/ast/scopes.h" 10 #include "src/ast/scopes.h"
(...skipping 1477 matching lines...) Expand 10 before | Expand all | Expand 10 after
1488 Comment cmnt(masm_, "[ RegExpLiteral"); 1488 Comment cmnt(masm_, "[ RegExpLiteral");
1489 Callable callable = CodeFactory::FastCloneRegExp(isolate()); 1489 Callable callable = CodeFactory::FastCloneRegExp(isolate());
1490 CallInterfaceDescriptor descriptor = callable.descriptor(); 1490 CallInterfaceDescriptor descriptor = callable.descriptor();
1491 LoadFromFrameField(JavaScriptFrameConstants::kFunctionOffset, 1491 LoadFromFrameField(JavaScriptFrameConstants::kFunctionOffset,
1492 descriptor.GetRegisterParameter(0)); 1492 descriptor.GetRegisterParameter(0));
1493 __ Move(descriptor.GetRegisterParameter(1), 1493 __ Move(descriptor.GetRegisterParameter(1),
1494 Smi::FromInt(expr->literal_index())); 1494 Smi::FromInt(expr->literal_index()));
1495 __ Move(descriptor.GetRegisterParameter(2), expr->pattern()); 1495 __ Move(descriptor.GetRegisterParameter(2), expr->pattern());
1496 __ Move(descriptor.GetRegisterParameter(3), Smi::FromInt(expr->flags())); 1496 __ Move(descriptor.GetRegisterParameter(3), Smi::FromInt(expr->flags()));
1497 __ Call(callable.code(), RelocInfo::CODE_TARGET); 1497 __ Call(callable.code(), RelocInfo::CODE_TARGET);
1498
1499 // Reload the context register after the call as i.e. TurboFan code stubs
1500 // won't preserve the context register.
1501 LoadFromFrameField(StandardFrameConstants::kContextOffset,
1502 context_register());
1498 context()->Plug(result_register()); 1503 context()->Plug(result_register());
1499 } 1504 }
1500 1505
1501 void FullCodeGenerator::VisitNativeFunctionLiteral( 1506 void FullCodeGenerator::VisitNativeFunctionLiteral(
1502 NativeFunctionLiteral* expr) { 1507 NativeFunctionLiteral* expr) {
1503 Comment cmnt(masm_, "[ NativeFunctionLiteral"); 1508 Comment cmnt(masm_, "[ NativeFunctionLiteral");
1504 Handle<SharedFunctionInfo> shared = 1509 Handle<SharedFunctionInfo> shared =
1505 Compiler::GetSharedFunctionInfoForNative(expr->extension(), expr->name()); 1510 Compiler::GetSharedFunctionInfoForNative(expr->extension(), expr->name());
1506 EmitNewClosure(shared, false); 1511 EmitNewClosure(shared, false);
1507 } 1512 }
(...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after
1931 return var->scope()->is_nonlinear() || 1936 return var->scope()->is_nonlinear() ||
1932 var->initializer_position() >= proxy->position(); 1937 var->initializer_position() >= proxy->position();
1933 } 1938 }
1934 1939
1935 1940
1936 #undef __ 1941 #undef __
1937 1942
1938 1943
1939 } // namespace internal 1944 } // namespace internal
1940 } // namespace v8 1945 } // namespace v8
OLDNEW
« no previous file with comments | « src/deoptimize-reason.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698