| OLD | NEW |
| 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/code-stubs.h" | 5 #include "src/code-stubs.h" |
| 6 | 6 |
| 7 #include "src/bailout-reason.h" | 7 #include "src/bailout-reason.h" |
| 8 #include "src/crankshaft/hydrogen.h" | 8 #include "src/crankshaft/hydrogen.h" |
| 9 #include "src/crankshaft/lithium.h" | 9 #include "src/crankshaft/lithium.h" |
| 10 #include "src/field-index.h" | 10 #include "src/field-index.h" |
| (...skipping 1401 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1412 return BuildInternalArrayConstructor(kind, MULTIPLE); | 1412 return BuildInternalArrayConstructor(kind, MULTIPLE); |
| 1413 } | 1413 } |
| 1414 | 1414 |
| 1415 | 1415 |
| 1416 Handle<Code> InternalArrayNArgumentsConstructorStub::GenerateCode() { | 1416 Handle<Code> InternalArrayNArgumentsConstructorStub::GenerateCode() { |
| 1417 return DoGenerateCode(this); | 1417 return DoGenerateCode(this); |
| 1418 } | 1418 } |
| 1419 | 1419 |
| 1420 | 1420 |
| 1421 template <> | 1421 template <> |
| 1422 HValue* CodeStubGraphBuilder<CompareNilICStub>::BuildCodeInitializedStub() { | |
| 1423 Isolate* isolate = graph()->isolate(); | |
| 1424 CompareNilICStub* stub = casted_stub(); | |
| 1425 HIfContinuation continuation; | |
| 1426 Handle<Map> sentinel_map(isolate->heap()->meta_map()); | |
| 1427 Type* type = stub->GetType(zone(), sentinel_map); | |
| 1428 BuildCompareNil(GetParameter(0), type, &continuation, kEmbedMapsViaWeakCells); | |
| 1429 IfBuilder if_nil(this, &continuation); | |
| 1430 if_nil.Then(); | |
| 1431 if (continuation.IsFalseReachable()) { | |
| 1432 if_nil.Else(); | |
| 1433 if_nil.Return(graph()->GetConstantFalse()); | |
| 1434 } | |
| 1435 if_nil.End(); | |
| 1436 return continuation.IsTrueReachable() ? graph()->GetConstantTrue() | |
| 1437 : graph()->GetConstantUndefined(); | |
| 1438 } | |
| 1439 | |
| 1440 | |
| 1441 Handle<Code> CompareNilICStub::GenerateCode() { | |
| 1442 return DoGenerateCode(this); | |
| 1443 } | |
| 1444 | |
| 1445 | |
| 1446 template <> | |
| 1447 HValue* CodeStubGraphBuilder<BinaryOpICStub>::BuildCodeInitializedStub() { | 1422 HValue* CodeStubGraphBuilder<BinaryOpICStub>::BuildCodeInitializedStub() { |
| 1448 BinaryOpICState state = casted_stub()->state(); | 1423 BinaryOpICState state = casted_stub()->state(); |
| 1449 | 1424 |
| 1450 HValue* left = GetParameter(BinaryOpICStub::kLeft); | 1425 HValue* left = GetParameter(BinaryOpICStub::kLeft); |
| 1451 HValue* right = GetParameter(BinaryOpICStub::kRight); | 1426 HValue* right = GetParameter(BinaryOpICStub::kRight); |
| 1452 | 1427 |
| 1453 Type* left_type = state.GetLeftType(); | 1428 Type* left_type = state.GetLeftType(); |
| 1454 Type* right_type = state.GetRightType(); | 1429 Type* right_type = state.GetRightType(); |
| 1455 Type* result_type = state.GetResultType(); | 1430 Type* result_type = state.GetResultType(); |
| 1456 | 1431 |
| (...skipping 967 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2424 return Pop(); | 2399 return Pop(); |
| 2425 } | 2400 } |
| 2426 | 2401 |
| 2427 | 2402 |
| 2428 Handle<Code> KeyedLoadGenericStub::GenerateCode() { | 2403 Handle<Code> KeyedLoadGenericStub::GenerateCode() { |
| 2429 return DoGenerateCode(this); | 2404 return DoGenerateCode(this); |
| 2430 } | 2405 } |
| 2431 | 2406 |
| 2432 } // namespace internal | 2407 } // namespace internal |
| 2433 } // namespace v8 | 2408 } // namespace v8 |
| OLD | NEW |