| OLD | NEW | 
|---|
| 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/ast-numbering.h" | 10 #include "src/ast/ast-numbering.h" | 
| (...skipping 12445 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 12456 void HOptimizedGraphBuilder::GenerateIsDate(CallRuntime* call) { | 12456 void HOptimizedGraphBuilder::GenerateIsDate(CallRuntime* call) { | 
| 12457   DCHECK_EQ(1, call->arguments()->length()); | 12457   DCHECK_EQ(1, call->arguments()->length()); | 
| 12458   CHECK_ALIVE(VisitForValue(call->arguments()->at(0))); | 12458   CHECK_ALIVE(VisitForValue(call->arguments()->at(0))); | 
| 12459   HValue* value = Pop(); | 12459   HValue* value = Pop(); | 
| 12460   HHasInstanceTypeAndBranch* result = | 12460   HHasInstanceTypeAndBranch* result = | 
| 12461       New<HHasInstanceTypeAndBranch>(value, JS_DATE_TYPE); | 12461       New<HHasInstanceTypeAndBranch>(value, JS_DATE_TYPE); | 
| 12462   return ast_context()->ReturnControl(result, call->id()); | 12462   return ast_context()->ReturnControl(result, call->id()); | 
| 12463 } | 12463 } | 
| 12464 | 12464 | 
| 12465 | 12465 | 
| 12466 void HOptimizedGraphBuilder::GenerateThrowNotDateError(CallRuntime* call) { |  | 
| 12467   DCHECK_EQ(0, call->arguments()->length()); |  | 
| 12468   Add<HDeoptimize>(Deoptimizer::kNotADateObject, Deoptimizer::EAGER); |  | 
| 12469   Add<HSimulate>(call->id(), FIXED_SIMULATE); |  | 
| 12470   return ast_context()->ReturnValue(graph()->GetConstantUndefined()); |  | 
| 12471 } |  | 
| 12472 |  | 
| 12473 |  | 
| 12474 void HOptimizedGraphBuilder::GenerateDateField(CallRuntime* call) { |  | 
| 12475   DCHECK(call->arguments()->length() == 2); |  | 
| 12476   DCHECK_NOT_NULL(call->arguments()->at(1)->AsLiteral()); |  | 
| 12477   Smi* index = Smi::cast(*(call->arguments()->at(1)->AsLiteral()->value())); |  | 
| 12478   CHECK_ALIVE(VisitForValue(call->arguments()->at(0))); |  | 
| 12479   HValue* date = Pop(); |  | 
| 12480   HDateField* result = New<HDateField>(date, index); |  | 
| 12481   return ast_context()->ReturnInstruction(result, call->id()); |  | 
| 12482 } |  | 
| 12483 |  | 
| 12484 |  | 
| 12485 void HOptimizedGraphBuilder::GenerateOneByteSeqStringSetChar( | 12466 void HOptimizedGraphBuilder::GenerateOneByteSeqStringSetChar( | 
| 12486     CallRuntime* call) { | 12467     CallRuntime* call) { | 
| 12487   DCHECK(call->arguments()->length() == 3); | 12468   DCHECK(call->arguments()->length() == 3); | 
| 12488   CHECK_ALIVE(VisitForValue(call->arguments()->at(0))); | 12469   CHECK_ALIVE(VisitForValue(call->arguments()->at(0))); | 
| 12489   CHECK_ALIVE(VisitForValue(call->arguments()->at(1))); | 12470   CHECK_ALIVE(VisitForValue(call->arguments()->at(1))); | 
| 12490   CHECK_ALIVE(VisitForValue(call->arguments()->at(2))); | 12471   CHECK_ALIVE(VisitForValue(call->arguments()->at(2))); | 
| 12491   HValue* string = Pop(); | 12472   HValue* string = Pop(); | 
| 12492   HValue* value = Pop(); | 12473   HValue* value = Pop(); | 
| 12493   HValue* index = Pop(); | 12474   HValue* index = Pop(); | 
| 12494   Add<HSeqStringSetChar>(String::ONE_BYTE_ENCODING, string, | 12475   Add<HSeqStringSetChar>(String::ONE_BYTE_ENCODING, string, | 
| (...skipping 1125 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 13620     isolate()->GetHTracer()->TraceHydrogen(name(), graph_); | 13601     isolate()->GetHTracer()->TraceHydrogen(name(), graph_); | 
| 13621   } | 13602   } | 
| 13622 | 13603 | 
| 13623 #ifdef DEBUG | 13604 #ifdef DEBUG | 
| 13624   graph_->Verify(false);  // No full verify. | 13605   graph_->Verify(false);  // No full verify. | 
| 13625 #endif | 13606 #endif | 
| 13626 } | 13607 } | 
| 13627 | 13608 | 
| 13628 }  // namespace internal | 13609 }  // namespace internal | 
| 13629 }  // namespace v8 | 13610 }  // namespace v8 | 
| OLD | NEW | 
|---|