| 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/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #include "src/ast.h" | 7 #include "src/ast.h" |
| 8 #include "src/code-stubs.h" | 8 #include "src/code-stubs.h" |
| 9 #include "src/compiler.h" | 9 #include "src/compiler.h" |
| 10 #include "src/ic/ic.h" | 10 #include "src/ic/ic.h" |
| (...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 272 Maybe<int>* fixed_right_arg, | 272 Maybe<int>* fixed_right_arg, |
| 273 Handle<AllocationSite>* allocation_site, | 273 Handle<AllocationSite>* allocation_site, |
| 274 Token::Value op) { | 274 Token::Value op) { |
| 275 Handle<Object> object = GetInfo(id); | 275 Handle<Object> object = GetInfo(id); |
| 276 if (!object->IsCode()) { | 276 if (!object->IsCode()) { |
| 277 // For some binary ops we don't have ICs, e.g. Token::COMMA, but for the | 277 // For some binary ops we don't have ICs, e.g. Token::COMMA, but for the |
| 278 // operations covered by the BinaryOpIC we should always have them. | 278 // operations covered by the BinaryOpIC we should always have them. |
| 279 DCHECK(op < BinaryOpICState::FIRST_TOKEN || | 279 DCHECK(op < BinaryOpICState::FIRST_TOKEN || |
| 280 op > BinaryOpICState::LAST_TOKEN); | 280 op > BinaryOpICState::LAST_TOKEN); |
| 281 *left = *right = *result = Type::None(zone()); | 281 *left = *right = *result = Type::None(zone()); |
| 282 *fixed_right_arg = Maybe<int>(); | 282 *fixed_right_arg = Nothing<int>(); |
| 283 *allocation_site = Handle<AllocationSite>::null(); | 283 *allocation_site = Handle<AllocationSite>::null(); |
| 284 return; | 284 return; |
| 285 } | 285 } |
| 286 Handle<Code> code = Handle<Code>::cast(object); | 286 Handle<Code> code = Handle<Code>::cast(object); |
| 287 DCHECK_EQ(Code::BINARY_OP_IC, code->kind()); | 287 DCHECK_EQ(Code::BINARY_OP_IC, code->kind()); |
| 288 BinaryOpICState state(isolate(), code->extra_ic_state()); | 288 BinaryOpICState state(isolate(), code->extra_ic_state()); |
| 289 DCHECK_EQ(op, state.op()); | 289 DCHECK_EQ(op, state.op()); |
| 290 | 290 |
| 291 *left = state.GetLeftType(zone()); | 291 *left = state.GetLeftType(zone()); |
| 292 *right = state.GetRightType(zone()); | 292 *right = state.GetRightType(zone()); |
| (...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 562 UnseededNumberDictionary::kNotFound); | 562 UnseededNumberDictionary::kNotFound); |
| 563 // Dictionary has been allocated with sufficient size for all elements. | 563 // Dictionary has been allocated with sufficient size for all elements. |
| 564 DisallowHeapAllocation no_need_to_resize_dictionary; | 564 DisallowHeapAllocation no_need_to_resize_dictionary; |
| 565 HandleScope scope(isolate()); | 565 HandleScope scope(isolate()); |
| 566 USE(UnseededNumberDictionary::AtNumberPut( | 566 USE(UnseededNumberDictionary::AtNumberPut( |
| 567 dictionary_, IdToKey(ast_id), handle(target, isolate()))); | 567 dictionary_, IdToKey(ast_id), handle(target, isolate()))); |
| 568 } | 568 } |
| 569 | 569 |
| 570 | 570 |
| 571 } } // namespace v8::internal | 571 } } // namespace v8::internal |
| OLD | NEW |