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

Side by Side Diff: src/hydrogen.cc

Issue 1384443002: [es6] Fix missing bits for full @@toPrimitive support. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Remove useless cctest. Created 5 years, 2 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
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/hydrogen.h" 5 #include "src/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 12254 matching lines...) Expand 10 before | Expand all | Expand 10 after
12265 HValue* stub = Add<HConstant>(callable.code()); 12265 HValue* stub = Add<HConstant>(callable.code());
12266 HValue* values[] = {context(), input}; 12266 HValue* values[] = {context(), input};
12267 HInstruction* result = 12267 HInstruction* result =
12268 New<HCallWithDescriptor>(stub, 0, callable.descriptor(), 12268 New<HCallWithDescriptor>(stub, 0, callable.descriptor(),
12269 Vector<HValue*>(values, arraysize(values))); 12269 Vector<HValue*>(values, arraysize(values)));
12270 return ast_context()->ReturnInstruction(result, call->id()); 12270 return ast_context()->ReturnInstruction(result, call->id());
12271 } 12271 }
12272 } 12272 }
12273 12273
12274 12274
12275 void HOptimizedGraphBuilder::GenerateToNumber(CallRuntime* call) {
12276 DCHECK_EQ(1, call->arguments()->length());
12277 CHECK_ALIVE(VisitForValue(call->arguments()->at(0)));
12278 Callable callable = CodeFactory::ToNumber(isolate());
12279 HValue* input = Pop();
12280 if (input->type().IsTaggedNumber()) {
12281 return ast_context()->ReturnValue(input);
12282 } else {
12283 HValue* stub = Add<HConstant>(callable.code());
12284 HValue* values[] = {context(), input};
12285 HInstruction* result =
12286 New<HCallWithDescriptor>(stub, 0, callable.descriptor(),
12287 Vector<HValue*>(values, arraysize(values)));
12288 return ast_context()->ReturnInstruction(result, call->id());
12289 }
12290 }
12291
12292
12275 void HOptimizedGraphBuilder::GenerateIsJSProxy(CallRuntime* call) { 12293 void HOptimizedGraphBuilder::GenerateIsJSProxy(CallRuntime* call) {
12276 DCHECK(call->arguments()->length() == 1); 12294 DCHECK(call->arguments()->length() == 1);
12277 CHECK_ALIVE(VisitForValue(call->arguments()->at(0))); 12295 CHECK_ALIVE(VisitForValue(call->arguments()->at(0)));
12278 HValue* value = Pop(); 12296 HValue* value = Pop();
12279 HIfContinuation continuation; 12297 HIfContinuation continuation;
12280 IfBuilder if_proxy(this); 12298 IfBuilder if_proxy(this);
12281 12299
12282 HValue* smicheck = if_proxy.IfNot<HIsSmiAndBranch>(value); 12300 HValue* smicheck = if_proxy.IfNot<HIsSmiAndBranch>(value);
12283 if_proxy.And(); 12301 if_proxy.And();
12284 HValue* map = Add<HLoadNamedField>(value, smicheck, HObjectAccess::ForMap()); 12302 HValue* map = Add<HLoadNamedField>(value, smicheck, HObjectAccess::ForMap());
(...skipping 1361 matching lines...) Expand 10 before | Expand all | Expand 10 after
13646 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); 13664 isolate()->GetHTracer()->TraceHydrogen(name(), graph_);
13647 } 13665 }
13648 13666
13649 #ifdef DEBUG 13667 #ifdef DEBUG
13650 graph_->Verify(false); // No full verify. 13668 graph_->Verify(false); // No full verify.
13651 #endif 13669 #endif
13652 } 13670 }
13653 13671
13654 } // namespace internal 13672 } // namespace internal
13655 } // namespace v8 13673 } // namespace v8
OLDNEW
« no previous file with comments | « src/hydrogen.h ('k') | src/i18n.js » ('j') | test/cctest/compiler/test-run-jscalls.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698