OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 6457 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6468 HCompareMap* mapcompare = | 6468 HCompareMap* mapcompare = |
6469 New<HCompareMap>(object, map, this_map, other_map); | 6469 New<HCompareMap>(object, map, this_map, other_map); |
6470 FinishCurrentBlock(mapcompare); | 6470 FinishCurrentBlock(mapcompare); |
6471 | 6471 |
6472 set_current_block(this_map); | 6472 set_current_block(this_map); |
6473 HInstruction* access = NULL; | 6473 HInstruction* access = NULL; |
6474 if (IsDictionaryElementsKind(elements_kind)) { | 6474 if (IsDictionaryElementsKind(elements_kind)) { |
6475 access = AddInstruction(BuildKeyedGeneric(access_type, object, key, val)); | 6475 access = AddInstruction(BuildKeyedGeneric(access_type, object, key, val)); |
6476 } else { | 6476 } else { |
6477 ASSERT(IsFastElementsKind(elements_kind) || | 6477 ASSERT(IsFastElementsKind(elements_kind) || |
6478 IsExternalArrayElementsKind(elements_kind)); | 6478 IsExternalArrayElementsKind(elements_kind) || |
| 6479 IsFixedTypedArrayElementsKind(elements_kind)); |
6479 LoadKeyedHoleMode load_mode = BuildKeyedHoleMode(map); | 6480 LoadKeyedHoleMode load_mode = BuildKeyedHoleMode(map); |
6480 // Happily, mapcompare is a checked object. | 6481 // Happily, mapcompare is a checked object. |
6481 access = BuildUncheckedMonomorphicElementAccess( | 6482 access = BuildUncheckedMonomorphicElementAccess( |
6482 mapcompare, key, val, | 6483 mapcompare, key, val, |
6483 map->instance_type() == JS_ARRAY_TYPE, | 6484 map->instance_type() == JS_ARRAY_TYPE, |
6484 elements_kind, access_type, | 6485 elements_kind, access_type, |
6485 load_mode, | 6486 load_mode, |
6486 store_mode); | 6487 store_mode); |
6487 } | 6488 } |
6488 *has_side_effects |= access->HasObservableSideEffects(); | 6489 *has_side_effects |= access->HasObservableSideEffects(); |
(...skipping 1925 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8414 for (int offset = ViewClass::kSize; | 8415 for (int offset = ViewClass::kSize; |
8415 offset < ViewClass::kSizeWithInternalFields; | 8416 offset < ViewClass::kSizeWithInternalFields; |
8416 offset += kPointerSize) { | 8417 offset += kPointerSize) { |
8417 Add<HStoreNamedField>(obj, | 8418 Add<HStoreNamedField>(obj, |
8418 HObjectAccess::ForObservableJSObjectOffset(offset), | 8419 HObjectAccess::ForObservableJSObjectOffset(offset), |
8419 graph()->GetConstant0()); | 8420 graph()->GetConstant0()); |
8420 } | 8421 } |
8421 | 8422 |
8422 Add<HStoreNamedField>( | 8423 Add<HStoreNamedField>( |
8423 obj, | 8424 obj, |
8424 HObjectAccess::ForJSArrayBufferViewBuffer(), buffer); | |
8425 Add<HStoreNamedField>( | |
8426 obj, | |
8427 HObjectAccess::ForJSArrayBufferViewByteOffset(), | 8425 HObjectAccess::ForJSArrayBufferViewByteOffset(), |
8428 byte_offset); | 8426 byte_offset); |
8429 Add<HStoreNamedField>( | 8427 Add<HStoreNamedField>( |
8430 obj, | 8428 obj, |
8431 HObjectAccess::ForJSArrayBufferViewByteLength(), | 8429 HObjectAccess::ForJSArrayBufferViewByteLength(), |
8432 byte_length); | 8430 byte_length); |
8433 | 8431 |
8434 HObjectAccess weak_first_view_access = | 8432 if (buffer != NULL) { |
8435 HObjectAccess::ForJSArrayBufferWeakFirstView(); | 8433 Add<HStoreNamedField>( |
8436 Add<HStoreNamedField>(obj, | 8434 obj, |
8437 HObjectAccess::ForJSArrayBufferViewWeakNext(), | 8435 HObjectAccess::ForJSArrayBufferViewBuffer(), buffer); |
8438 Add<HLoadNamedField>(buffer, static_cast<HValue*>(NULL), | 8436 HObjectAccess weak_first_view_access = |
8439 weak_first_view_access)); | 8437 HObjectAccess::ForJSArrayBufferWeakFirstView(); |
8440 Add<HStoreNamedField>( | 8438 Add<HStoreNamedField>(obj, |
8441 buffer, weak_first_view_access, obj); | 8439 HObjectAccess::ForJSArrayBufferViewWeakNext(), |
| 8440 Add<HLoadNamedField>(buffer, |
| 8441 static_cast<HValue*>(NULL), |
| 8442 weak_first_view_access)); |
| 8443 Add<HStoreNamedField>(buffer, weak_first_view_access, obj); |
| 8444 } else { |
| 8445 Add<HStoreNamedField>( |
| 8446 obj, |
| 8447 HObjectAccess::ForJSArrayBufferViewBuffer(), |
| 8448 Add<HConstant>(static_cast<int32_t>(0))); |
| 8449 Add<HStoreNamedField>(obj, |
| 8450 HObjectAccess::ForJSArrayBufferViewWeakNext(), |
| 8451 graph()->GetConstantUndefined()); |
| 8452 } |
8442 } | 8453 } |
8443 | 8454 |
8444 | 8455 |
8445 void HOptimizedGraphBuilder::VisitDataViewInitialize( | 8456 void HOptimizedGraphBuilder::VisitDataViewInitialize( |
8446 CallRuntime* expr) { | 8457 CallRuntime* expr) { |
8447 ZoneList<Expression*>* arguments = expr->arguments(); | 8458 ZoneList<Expression*>* arguments = expr->arguments(); |
8448 | 8459 |
8449 NoObservableSideEffectsScope scope(this); | 8460 NoObservableSideEffectsScope scope(this); |
8450 ASSERT(arguments->length()== 4); | 8461 ASSERT(arguments->length()== 4); |
8451 CHECK_ALIVE(VisitForValue(arguments->at(0))); | 8462 CHECK_ALIVE(VisitForValue(arguments->at(0))); |
8452 HValue* obj = Pop(); | 8463 HValue* obj = Pop(); |
8453 | 8464 |
8454 CHECK_ALIVE(VisitForValue(arguments->at(1))); | 8465 CHECK_ALIVE(VisitForValue(arguments->at(1))); |
8455 HValue* buffer = Pop(); | 8466 HValue* buffer = Pop(); |
8456 | 8467 |
8457 CHECK_ALIVE(VisitForValue(arguments->at(2))); | 8468 CHECK_ALIVE(VisitForValue(arguments->at(2))); |
8458 HValue* byte_offset = Pop(); | 8469 HValue* byte_offset = Pop(); |
8459 | 8470 |
8460 CHECK_ALIVE(VisitForValue(arguments->at(3))); | 8471 CHECK_ALIVE(VisitForValue(arguments->at(3))); |
8461 HValue* byte_length = Pop(); | 8472 HValue* byte_length = Pop(); |
8462 | 8473 |
8463 BuildArrayBufferViewInitialization<JSDataView>( | 8474 BuildArrayBufferViewInitialization<JSDataView>( |
8464 obj, buffer, byte_offset, byte_length); | 8475 obj, buffer, byte_offset, byte_length); |
8465 } | 8476 } |
8466 | 8477 |
| 8478 static Handle<Map> TypedArrayMap(Isolate* isolate, |
| 8479 ExternalArrayType array_type, |
| 8480 ElementsKind target_kind) { |
| 8481 Handle<Context> native_context = isolate->native_context(); |
| 8482 Handle<JSFunction> fun; |
| 8483 switch (array_type) { |
| 8484 #define TYPED_ARRAY_CASE(Type, type, TYPE, ctype, size) \ |
| 8485 case kExternal##Type##Array: \ |
| 8486 fun = Handle<JSFunction>(native_context->type##_array_fun()); \ |
| 8487 break; |
8467 | 8488 |
8468 void HOptimizedGraphBuilder::VisitTypedArrayInitialize( | 8489 TYPED_ARRAYS(TYPED_ARRAY_CASE) |
8469 CallRuntime* expr) { | 8490 #undef TYPED_ARRAY_CASE |
| 8491 } |
| 8492 Handle<Map> map(fun->initial_map()); |
| 8493 return Map::AsElementsKind(map, target_kind); |
| 8494 } |
| 8495 |
| 8496 |
| 8497 void HOptimizedGraphBuilder::VisitTypedArrayInitialize(CallRuntime* expr) { |
8470 ZoneList<Expression*>* arguments = expr->arguments(); | 8498 ZoneList<Expression*>* arguments = expr->arguments(); |
8471 | 8499 |
8472 NoObservableSideEffectsScope scope(this); | 8500 NoObservableSideEffectsScope scope(this); |
8473 static const int kObjectArg = 0; | 8501 static const int kObjectArg = 0; |
8474 static const int kArrayIdArg = 1; | 8502 static const int kArrayIdArg = 1; |
8475 static const int kBufferArg = 2; | 8503 static const int kBufferArg = 2; |
8476 static const int kByteOffsetArg = 3; | 8504 static const int kByteOffsetArg = 3; |
8477 static const int kByteLengthArg = 4; | 8505 static const int kByteLengthArg = 4; |
8478 static const int kArgsLength = 5; | 8506 static const int kArgsLength = 5; |
8479 ASSERT(arguments->length() == kArgsLength); | 8507 ASSERT(arguments->length() == kArgsLength); |
8480 | 8508 |
8481 | 8509 |
8482 CHECK_ALIVE(VisitForValue(arguments->at(kObjectArg))); | 8510 CHECK_ALIVE(VisitForValue(arguments->at(kObjectArg))); |
8483 HValue* obj = Pop(); | 8511 HValue* obj = Pop(); |
8484 | 8512 |
8485 ASSERT(arguments->at(kArrayIdArg)->node_type() == AstNode::kLiteral); | 8513 ASSERT(arguments->at(kArrayIdArg)->node_type() == AstNode::kLiteral); |
8486 Handle<Object> value = | 8514 Handle<Object> value = |
8487 static_cast<Literal*>(arguments->at(kArrayIdArg))->value(); | 8515 static_cast<Literal*>(arguments->at(kArrayIdArg))->value(); |
8488 ASSERT(value->IsSmi()); | 8516 ASSERT(value->IsSmi()); |
8489 int array_id = Smi::cast(*value)->value(); | 8517 int array_id = Smi::cast(*value)->value(); |
8490 | 8518 |
8491 CHECK_ALIVE(VisitForValue(arguments->at(kBufferArg))); | 8519 HValue* buffer; |
8492 HValue* buffer = Pop(); | 8520 if (!arguments->at(kBufferArg)->IsNullLiteral()) { |
| 8521 CHECK_ALIVE(VisitForValue(arguments->at(kBufferArg))); |
| 8522 buffer = Pop(); |
| 8523 } else { |
| 8524 buffer = NULL; |
| 8525 } |
8493 | 8526 |
8494 HValue* byte_offset; | 8527 HValue* byte_offset; |
8495 bool is_zero_byte_offset; | 8528 bool is_zero_byte_offset; |
8496 | 8529 |
8497 if (arguments->at(kByteOffsetArg)->node_type() == AstNode::kLiteral | 8530 if (arguments->at(kByteOffsetArg)->node_type() == AstNode::kLiteral |
8498 && Smi::FromInt(0) == | 8531 && Smi::FromInt(0) == |
8499 *static_cast<Literal*>(arguments->at(kByteOffsetArg))->value()) { | 8532 *static_cast<Literal*>(arguments->at(kByteOffsetArg))->value()) { |
8500 byte_offset = Add<HConstant>(static_cast<int32_t>(0)); | 8533 byte_offset = Add<HConstant>(static_cast<int32_t>(0)); |
8501 is_zero_byte_offset = true; | 8534 is_zero_byte_offset = true; |
8502 } else { | 8535 } else { |
8503 CHECK_ALIVE(VisitForValue(arguments->at(kByteOffsetArg))); | 8536 CHECK_ALIVE(VisitForValue(arguments->at(kByteOffsetArg))); |
8504 byte_offset = Pop(); | 8537 byte_offset = Pop(); |
8505 is_zero_byte_offset = false; | 8538 is_zero_byte_offset = false; |
| 8539 ASSERT(buffer != NULL); |
8506 } | 8540 } |
8507 | 8541 |
8508 CHECK_ALIVE(VisitForValue(arguments->at(kByteLengthArg))); | 8542 CHECK_ALIVE(VisitForValue(arguments->at(kByteLengthArg))); |
8509 HValue* byte_length = Pop(); | 8543 HValue* byte_length = Pop(); |
8510 | 8544 |
8511 IfBuilder byte_offset_smi(this); | 8545 IfBuilder byte_offset_smi(this); |
8512 | 8546 |
8513 if (!is_zero_byte_offset) { | 8547 if (!is_zero_byte_offset) { |
8514 byte_offset_smi.If<HIsSmiAndBranch>(byte_offset); | 8548 byte_offset_smi.If<HIsSmiAndBranch>(byte_offset); |
8515 byte_offset_smi.Then(); | 8549 byte_offset_smi.Then(); |
8516 } | 8550 } |
8517 | 8551 |
| 8552 ExternalArrayType array_type = |
| 8553 kExternalInt8Array; // Bogus initialization. |
| 8554 size_t element_size = 1; // Bogus initialization. |
| 8555 ElementsKind external_elements_kind = // Bogus initialization. |
| 8556 EXTERNAL_INT8_ELEMENTS; |
| 8557 ElementsKind fixed_elements_kind = // Bogus initialization. |
| 8558 INT8_ELEMENTS; |
| 8559 Runtime::ArrayIdToTypeAndSize(array_id, |
| 8560 &array_type, |
| 8561 &external_elements_kind, |
| 8562 &fixed_elements_kind, |
| 8563 &element_size); |
| 8564 |
| 8565 |
8518 { // byte_offset is Smi. | 8566 { // byte_offset is Smi. |
8519 BuildArrayBufferViewInitialization<JSTypedArray>( | 8567 BuildArrayBufferViewInitialization<JSTypedArray>( |
8520 obj, buffer, byte_offset, byte_length); | 8568 obj, buffer, byte_offset, byte_length); |
8521 | 8569 |
8522 ExternalArrayType array_type = kExternalInt8Array; // Bogus initialization. | |
8523 size_t element_size = 1; // Bogus initialization. | |
8524 Runtime::ArrayIdToTypeAndSize(array_id, &array_type, &element_size); | |
8525 | 8570 |
8526 HInstruction* length = AddUncasted<HDiv>(byte_length, | 8571 HInstruction* length = AddUncasted<HDiv>(byte_length, |
8527 Add<HConstant>(static_cast<int32_t>(element_size))); | 8572 Add<HConstant>(static_cast<int32_t>(element_size))); |
8528 | 8573 |
8529 Add<HStoreNamedField>(obj, | 8574 Add<HStoreNamedField>(obj, |
8530 HObjectAccess::ForJSTypedArrayLength(), | 8575 HObjectAccess::ForJSTypedArrayLength(), |
8531 length); | 8576 length); |
8532 | 8577 |
8533 Handle<Map> external_array_map( | 8578 HValue* elements; |
8534 isolate()->heap()->MapForExternalArrayType(array_type)); | 8579 if (buffer != NULL) { |
| 8580 Handle<Map> external_array_map( |
| 8581 isolate()->heap()->MapForExternalArrayType(array_type)); |
| 8582 elements = |
| 8583 Add<HAllocate>( |
| 8584 Add<HConstant>(ExternalArray::kAlignedSize), |
| 8585 HType::JSArray(), |
| 8586 NOT_TENURED, |
| 8587 external_array_map->instance_type()); |
8535 | 8588 |
8536 HValue* elements = | 8589 AddStoreMapConstant(elements, external_array_map); |
8537 Add<HAllocate>( | |
8538 Add<HConstant>(ExternalArray::kAlignedSize), | |
8539 HType::JSArray(), | |
8540 NOT_TENURED, | |
8541 external_array_map->instance_type()); | |
8542 | 8590 |
8543 AddStoreMapConstant(elements, external_array_map); | 8591 HValue* backing_store = Add<HLoadNamedField>( |
| 8592 buffer, static_cast<HValue*>(NULL), |
| 8593 HObjectAccess::ForJSArrayBufferBackingStore()); |
8544 | 8594 |
8545 HValue* backing_store = Add<HLoadNamedField>( | 8595 HValue* typed_array_start; |
8546 buffer, static_cast<HValue*>(NULL), | 8596 if (is_zero_byte_offset) { |
8547 HObjectAccess::ForJSArrayBufferBackingStore()); | 8597 typed_array_start = backing_store; |
| 8598 } else { |
| 8599 HInstruction* external_pointer = |
| 8600 AddUncasted<HAdd>(backing_store, byte_offset); |
| 8601 // Arguments are checked prior to call to TypedArrayInitialize, |
| 8602 // including byte_offset. |
| 8603 external_pointer->ClearFlag(HValue::kCanOverflow); |
| 8604 typed_array_start = external_pointer; |
| 8605 } |
8548 | 8606 |
8549 HValue* typed_array_start; | 8607 |
8550 if (is_zero_byte_offset) { | 8608 Add<HStoreNamedField>(elements, |
8551 typed_array_start = backing_store; | 8609 HObjectAccess::ForExternalArrayExternalPointer(), |
| 8610 typed_array_start); |
| 8611 |
| 8612 Handle<Map> obj_map = TypedArrayMap( |
| 8613 isolate(), array_type, external_elements_kind); |
| 8614 AddStoreMapConstant(obj, obj_map); |
| 8615 Add<HStoreNamedField>(elements, |
| 8616 HObjectAccess::ForFixedArrayLength(), |
| 8617 length, INITIALIZING_STORE); |
8552 } else { | 8618 } else { |
8553 HInstruction* external_pointer = | 8619 ASSERT(is_zero_byte_offset); |
8554 AddUncasted<HAdd>(backing_store, byte_offset); | 8620 |
8555 // Arguments are checked prior to call to TypedArrayInitialize, | 8621 STATIC_ASSERT( |
8556 // including byte_offset. | 8622 (FixedTypedArrayBase::kHeaderSize & kObjectAlignmentMask) == 0); |
8557 external_pointer->ClearFlag(HValue::kCanOverflow); | 8623 HValue* total_size; |
8558 typed_array_start = external_pointer; | 8624 |
| 8625 if (element_size % kObjectAlignment != 0) { |
| 8626 HConstant* header_size = Add<HConstant>(static_cast<int32_t>( |
| 8627 FixedTypedArrayBase::kHeaderSize + kObjectAlignmentMask)); |
| 8628 HValue* unaligned_size = AddUncasted<HAdd>(byte_length, header_size); |
| 8629 unaligned_size->ClearFlag(HValue::kCanOverflow); |
| 8630 total_size = AddUncasted<HBitwise>( |
| 8631 Token::BIT_AND, unaligned_size, |
| 8632 Add<HConstant>(static_cast<int32_t>(~kObjectAlignmentMask))); |
| 8633 } else { |
| 8634 total_size = AddUncasted<HAdd>(byte_length, |
| 8635 Add<HConstant>(FixedTypedArrayBase::kHeaderSize)); |
| 8636 total_size->ClearFlag(HValue::kCanOverflow); |
| 8637 } |
| 8638 |
| 8639 Handle<Map> fixed_typed_array_map( |
| 8640 isolate()->heap()->MapForFixedTypedArray(array_type)); |
| 8641 elements = |
| 8642 Add<HAllocate>(total_size, HType::JSArray(), |
| 8643 NOT_TENURED, |
| 8644 fixed_typed_array_map->instance_type()); |
| 8645 AddStoreMapConstant(elements, fixed_typed_array_map); |
| 8646 |
| 8647 Add<HStoreNamedField>(elements, |
| 8648 HObjectAccess::ForFixedArrayLength(), |
| 8649 length, INITIALIZING_STORE); |
| 8650 HValue* filler = Add<HConstant>(static_cast<int32_t>(0)); |
| 8651 |
| 8652 { |
| 8653 LoopBuilder builder(this, context(), LoopBuilder::kPostIncrement); |
| 8654 |
| 8655 HValue* key = builder.BeginBody( |
| 8656 Add<HConstant>(static_cast<int32_t>(0)), |
| 8657 length, Token::LT); |
| 8658 Add<HStoreKeyed>(elements, key, filler, fixed_elements_kind); |
| 8659 |
| 8660 builder.EndBody(); |
| 8661 } |
8559 } | 8662 } |
8560 | 8663 Add<HStoreNamedField>( |
8561 Add<HStoreNamedField>(elements, | 8664 elements, HObjectAccess::ForFixedArrayLength(), length, |
8562 HObjectAccess::ForExternalArrayExternalPointer(), | 8665 INITIALIZING_STORE); |
8563 typed_array_start); | |
8564 Add<HStoreNamedField>(elements, | |
8565 HObjectAccess::ForFixedArrayLength(), | |
8566 length); | |
8567 Add<HStoreNamedField>( | 8666 Add<HStoreNamedField>( |
8568 obj, HObjectAccess::ForElementsPointer(), elements); | 8667 obj, HObjectAccess::ForElementsPointer(), elements); |
8569 } | 8668 } |
8570 | 8669 |
8571 if (!is_zero_byte_offset) { | 8670 if (!is_zero_byte_offset) { |
8572 byte_offset_smi.Else(); | 8671 byte_offset_smi.Else(); |
8573 { // byte_offset is not Smi. | 8672 { // byte_offset is not Smi. |
8574 Push(Add<HPushArgument>(obj)); | 8673 Push(Add<HPushArgument>(obj)); |
8575 VisitArgument(arguments->at(kArrayIdArg)); | 8674 VisitArgument(arguments->at(kArrayIdArg)); |
8576 Push(Add<HPushArgument>(buffer)); | 8675 Push(Add<HPushArgument>(buffer)); |
(...skipping 25 matching lines...) Expand all Loading... |
8602 if (function->function_id == Runtime::kTypedArrayInitialize) { | 8701 if (function->function_id == Runtime::kTypedArrayInitialize) { |
8603 return VisitTypedArrayInitialize(expr); | 8702 return VisitTypedArrayInitialize(expr); |
8604 } | 8703 } |
8605 | 8704 |
8606 if (function->function_id == Runtime::kMaxSmi) { | 8705 if (function->function_id == Runtime::kMaxSmi) { |
8607 ASSERT(expr->arguments()->length() == 0); | 8706 ASSERT(expr->arguments()->length() == 0); |
8608 HConstant* max_smi = New<HConstant>(static_cast<int32_t>(Smi::kMaxValue)); | 8707 HConstant* max_smi = New<HConstant>(static_cast<int32_t>(Smi::kMaxValue)); |
8609 return ast_context()->ReturnInstruction(max_smi, expr->id()); | 8708 return ast_context()->ReturnInstruction(max_smi, expr->id()); |
8610 } | 8709 } |
8611 | 8710 |
| 8711 |
| 8712 if (function->function_id == Runtime::kTypedArrayInHeapThreshold) { |
| 8713 ASSERT(expr->arguments()->length() == 0); |
| 8714 HConstant* value = New<HConstant>( |
| 8715 static_cast<int32_t>(FLAG_typed_array_in_heap_threshold)); |
| 8716 return ast_context()->ReturnInstruction(value, expr->id()); |
| 8717 } |
| 8718 |
8612 if (function->intrinsic_type == Runtime::INLINE) { | 8719 if (function->intrinsic_type == Runtime::INLINE) { |
8613 ASSERT(expr->name()->length() > 0); | 8720 ASSERT(expr->name()->length() > 0); |
8614 ASSERT(expr->name()->Get(0) == '_'); | 8721 ASSERT(expr->name()->Get(0) == '_'); |
8615 // Call to an inline function. | 8722 // Call to an inline function. |
8616 int lookup_index = static_cast<int>(function->function_id) - | 8723 int lookup_index = static_cast<int>(function->function_id) - |
8617 static_cast<int>(Runtime::kFirstInlineFunction); | 8724 static_cast<int>(Runtime::kFirstInlineFunction); |
8618 ASSERT(lookup_index >= 0); | 8725 ASSERT(lookup_index >= 0); |
8619 ASSERT(static_cast<size_t>(lookup_index) < | 8726 ASSERT(static_cast<size_t>(lookup_index) < |
8620 ARRAY_SIZE(kInlineFunctionGenerators)); | 8727 ARRAY_SIZE(kInlineFunctionGenerators)); |
8621 InlineFunctionGenerator generator = kInlineFunctionGenerators[lookup_index]; | 8728 InlineFunctionGenerator generator = kInlineFunctionGenerators[lookup_index]; |
(...skipping 2667 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11289 if (ShouldProduceTraceOutput()) { | 11396 if (ShouldProduceTraceOutput()) { |
11290 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); | 11397 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); |
11291 } | 11398 } |
11292 | 11399 |
11293 #ifdef DEBUG | 11400 #ifdef DEBUG |
11294 graph_->Verify(false); // No full verify. | 11401 graph_->Verify(false); // No full verify. |
11295 #endif | 11402 #endif |
11296 } | 11403 } |
11297 | 11404 |
11298 } } // namespace v8::internal | 11405 } } // namespace v8::internal |
OLD | NEW |