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

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: using IS_REGEXP check 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
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 12626 matching lines...) Expand 10 before | Expand all | Expand 10 after
12637 // Support for direct calls from JavaScript to native RegExp code. 12637 // Support for direct calls from JavaScript to native RegExp code.
12638 void HOptimizedGraphBuilder::GenerateRegExpExec(CallRuntime* call) { 12638 void HOptimizedGraphBuilder::GenerateRegExpExec(CallRuntime* call) {
12639 DCHECK_EQ(4, call->arguments()->length()); 12639 DCHECK_EQ(4, call->arguments()->length());
12640 CHECK_ALIVE(VisitExpressions(call->arguments())); 12640 CHECK_ALIVE(VisitExpressions(call->arguments()));
12641 PushArgumentsFromEnvironment(call->arguments()->length()); 12641 PushArgumentsFromEnvironment(call->arguments()->length());
12642 HCallStub* result = New<HCallStub>(CodeStub::RegExpExec, 4); 12642 HCallStub* result = New<HCallStub>(CodeStub::RegExpExec, 4);
12643 return ast_context()->ReturnInstruction(result, call->id()); 12643 return ast_context()->ReturnInstruction(result, call->id());
12644 } 12644 }
12645 12645
12646 12646
12647 void HOptimizedGraphBuilder::GenerateRegExpFlags(CallRuntime* call) {
12648 DCHECK_EQ(1, call->arguments()->length());
12649 CHECK_ALIVE(VisitExpressions(call->arguments()));
12650 HValue* regexp = Pop();
12651 HValue* result =
12652 New<HLoadNamedField>(regexp, nullptr, HObjectAccess::ForJSRegExpFlags());
12653 return ast_context()->ReturnInstruction(result, call->id());
12654 }
12655
12656
12647 void HOptimizedGraphBuilder::GenerateDoubleLo(CallRuntime* call) { 12657 void HOptimizedGraphBuilder::GenerateDoubleLo(CallRuntime* call) {
12648 DCHECK_EQ(1, call->arguments()->length()); 12658 DCHECK_EQ(1, call->arguments()->length());
12649 CHECK_ALIVE(VisitForValue(call->arguments()->at(0))); 12659 CHECK_ALIVE(VisitForValue(call->arguments()->at(0)));
12650 HValue* value = Pop(); 12660 HValue* value = Pop();
12651 HInstruction* result = NewUncasted<HDoubleBits>(value, HDoubleBits::LOW); 12661 HInstruction* result = NewUncasted<HDoubleBits>(value, HDoubleBits::LOW);
12652 return ast_context()->ReturnInstruction(result, call->id()); 12662 return ast_context()->ReturnInstruction(result, call->id());
12653 } 12663 }
12654 12664
12655 12665
12656 void HOptimizedGraphBuilder::GenerateDoubleHi(CallRuntime* call) { 12666 void HOptimizedGraphBuilder::GenerateDoubleHi(CallRuntime* call) {
(...skipping 1024 matching lines...) Expand 10 before | Expand all | Expand 10 after
13681 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); 13691 isolate()->GetHTracer()->TraceHydrogen(name(), graph_);
13682 } 13692 }
13683 13693
13684 #ifdef DEBUG 13694 #ifdef DEBUG
13685 graph_->Verify(false); // No full verify. 13695 graph_->Verify(false); // No full verify.
13686 #endif 13696 #endif
13687 } 13697 }
13688 13698
13689 } // namespace internal 13699 } // namespace internal
13690 } // namespace v8 13700 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698