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 "v8.h" | 5 #include "v8.h" |
6 | 6 |
7 #include "code-stubs.h" | 7 #include "code-stubs.h" |
8 #include "hydrogen.h" | 8 #include "hydrogen.h" |
9 #include "lithium.h" | 9 #include "lithium.h" |
10 | 10 |
(...skipping 1402 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1413 template<> | 1413 template<> |
1414 HValue* CodeStubGraphBuilder<FastNewContextStub>::BuildCodeStub() { | 1414 HValue* CodeStubGraphBuilder<FastNewContextStub>::BuildCodeStub() { |
1415 int length = casted_stub()->slots() + Context::MIN_CONTEXT_SLOTS; | 1415 int length = casted_stub()->slots() + Context::MIN_CONTEXT_SLOTS; |
1416 | 1416 |
1417 // Get the function. | 1417 // Get the function. |
1418 HParameter* function = GetParameter(FastNewContextStub::kFunction); | 1418 HParameter* function = GetParameter(FastNewContextStub::kFunction); |
1419 | 1419 |
1420 // Allocate the context in new space. | 1420 // Allocate the context in new space. |
1421 HAllocate* function_context = Add<HAllocate>( | 1421 HAllocate* function_context = Add<HAllocate>( |
1422 Add<HConstant>(length * kPointerSize + FixedArray::kHeaderSize), | 1422 Add<HConstant>(length * kPointerSize + FixedArray::kHeaderSize), |
1423 HType::Tagged(), NOT_TENURED, FIXED_ARRAY_TYPE); | 1423 HType::HeapObject(), NOT_TENURED, FIXED_ARRAY_TYPE); |
1424 | 1424 |
1425 // Set up the object header. | 1425 // Set up the object header. |
1426 AddStoreMapConstant(function_context, | 1426 AddStoreMapConstant(function_context, |
1427 isolate()->factory()->function_context_map()); | 1427 isolate()->factory()->function_context_map()); |
1428 Add<HStoreNamedField>(function_context, | 1428 Add<HStoreNamedField>(function_context, |
1429 HObjectAccess::ForFixedArrayLength(), | 1429 HObjectAccess::ForFixedArrayLength(), |
1430 Add<HConstant>(length)); | 1430 Add<HConstant>(length)); |
1431 | 1431 |
1432 // Set up the fixed slots. | 1432 // Set up the fixed slots. |
1433 Add<HStoreNamedField>(function_context, | 1433 Add<HStoreNamedField>(function_context, |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1493 return BuildRegExpConstructResult(length, index, input); | 1493 return BuildRegExpConstructResult(length, index, input); |
1494 } | 1494 } |
1495 | 1495 |
1496 | 1496 |
1497 Handle<Code> RegExpConstructResultStub::GenerateCode() { | 1497 Handle<Code> RegExpConstructResultStub::GenerateCode() { |
1498 return DoGenerateCode(this); | 1498 return DoGenerateCode(this); |
1499 } | 1499 } |
1500 | 1500 |
1501 | 1501 |
1502 } } // namespace v8::internal | 1502 } } // namespace v8::internal |
OLD | NEW |