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

Side by Side Diff: src/crankshaft/hydrogen.cc

Issue 1428203003: Use in-object fields instead of private symbols for regexp slots. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebase Created 5 years, 1 month 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/crankshaft/hydrogen.h ('k') | src/crankshaft/hydrogen-instructions.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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/crankshaft/hydrogen.h" 5 #include "src/crankshaft/hydrogen.h"
6 6
7 #include <sstream> 7 #include <sstream>
8 8
9 #include "src/allocation-site-scopes.h" 9 #include "src/allocation-site-scopes.h"
10 #include "src/ast-numbering.h" 10 #include "src/ast-numbering.h"
(...skipping 12607 matching lines...) Expand 10 before | Expand all | Expand 10 after
12618 // Support for direct calls from JavaScript to native RegExp code. 12618 // Support for direct calls from JavaScript to native RegExp code.
12619 void HOptimizedGraphBuilder::GenerateRegExpExec(CallRuntime* call) { 12619 void HOptimizedGraphBuilder::GenerateRegExpExec(CallRuntime* call) {
12620 DCHECK_EQ(4, call->arguments()->length()); 12620 DCHECK_EQ(4, call->arguments()->length());
12621 CHECK_ALIVE(VisitExpressions(call->arguments())); 12621 CHECK_ALIVE(VisitExpressions(call->arguments()));
12622 PushArgumentsFromEnvironment(call->arguments()->length()); 12622 PushArgumentsFromEnvironment(call->arguments()->length());
12623 HCallStub* result = New<HCallStub>(CodeStub::RegExpExec, 4); 12623 HCallStub* result = New<HCallStub>(CodeStub::RegExpExec, 4);
12624 return ast_context()->ReturnInstruction(result, call->id()); 12624 return ast_context()->ReturnInstruction(result, call->id());
12625 } 12625 }
12626 12626
12627 12627
12628 void HOptimizedGraphBuilder::GenerateRegExpFlags(CallRuntime* call) {
12629 DCHECK_EQ(1, call->arguments()->length());
12630 CHECK_ALIVE(VisitExpressions(call->arguments()));
12631 HValue* regexp = Pop();
12632 HInstruction* result =
12633 New<HLoadNamedField>(regexp, nullptr, HObjectAccess::ForJSRegExpFlags());
12634 return ast_context()->ReturnInstruction(result, call->id());
12635 }
12636
12637
12638 void HOptimizedGraphBuilder::GenerateRegExpSource(CallRuntime* call) {
12639 DCHECK_EQ(1, call->arguments()->length());
12640 CHECK_ALIVE(VisitExpressions(call->arguments()));
12641 HValue* regexp = Pop();
12642 HInstruction* result =
12643 New<HLoadNamedField>(regexp, nullptr, HObjectAccess::ForJSRegExpSource());
12644 return ast_context()->ReturnInstruction(result, call->id());
12645 }
12646
12647
12628 void HOptimizedGraphBuilder::GenerateDoubleLo(CallRuntime* call) { 12648 void HOptimizedGraphBuilder::GenerateDoubleLo(CallRuntime* call) {
12629 DCHECK_EQ(1, call->arguments()->length()); 12649 DCHECK_EQ(1, call->arguments()->length());
12630 CHECK_ALIVE(VisitForValue(call->arguments()->at(0))); 12650 CHECK_ALIVE(VisitForValue(call->arguments()->at(0)));
12631 HValue* value = Pop(); 12651 HValue* value = Pop();
12632 HInstruction* result = NewUncasted<HDoubleBits>(value, HDoubleBits::LOW); 12652 HInstruction* result = NewUncasted<HDoubleBits>(value, HDoubleBits::LOW);
12633 return ast_context()->ReturnInstruction(result, call->id()); 12653 return ast_context()->ReturnInstruction(result, call->id());
12634 } 12654 }
12635 12655
12636 12656
12637 void HOptimizedGraphBuilder::GenerateDoubleHi(CallRuntime* call) { 12657 void HOptimizedGraphBuilder::GenerateDoubleHi(CallRuntime* call) {
(...skipping 967 matching lines...) Expand 10 before | Expand all | Expand 10 after
13605 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); 13625 isolate()->GetHTracer()->TraceHydrogen(name(), graph_);
13606 } 13626 }
13607 13627
13608 #ifdef DEBUG 13628 #ifdef DEBUG
13609 graph_->Verify(false); // No full verify. 13629 graph_->Verify(false); // No full verify.
13610 #endif 13630 #endif
13611 } 13631 }
13612 13632
13613 } // namespace internal 13633 } // namespace internal
13614 } // namespace v8 13634 } // namespace v8
OLDNEW
« no previous file with comments | « src/crankshaft/hydrogen.h ('k') | src/crankshaft/hydrogen-instructions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698