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/stub-cache.h" | 10 #include "src/ic/stub-cache.h" |
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
188 Handle<Map> map; | 188 Handle<Map> map; |
189 Map* raw_map = code->FindFirstMap(); | 189 Map* raw_map = code->FindFirstMap(); |
190 if (raw_map != NULL) { | 190 if (raw_map != NULL) { |
191 if (Map::TryUpdate(handle(raw_map)).ToHandle(&map) && | 191 if (Map::TryUpdate(handle(raw_map)).ToHandle(&map) && |
192 CanRetainOtherContext(*map, *native_context_)) { | 192 CanRetainOtherContext(*map, *native_context_)) { |
193 map = Handle<Map>::null(); | 193 map = Handle<Map>::null(); |
194 } | 194 } |
195 } | 195 } |
196 | 196 |
197 if (code->is_compare_ic_stub()) { | 197 if (code->is_compare_ic_stub()) { |
198 CompareIC::StubInfoToType(code->stub_key(), left_type, right_type, | 198 CompareICStub stub(code->stub_key(), isolate()); |
199 combined_type, map, zone()); | 199 *left_type = CompareIC::StateToType(zone(), stub.left()); |
| 200 *right_type = CompareIC::StateToType(zone(), stub.right()); |
| 201 *combined_type = CompareIC::StateToType(zone(), stub.state(), map); |
200 } else if (code->is_compare_nil_ic_stub()) { | 202 } else if (code->is_compare_nil_ic_stub()) { |
201 CompareNilICStub stub(isolate(), code->extra_ic_state()); | 203 CompareNilICStub stub(isolate(), code->extra_ic_state()); |
202 *combined_type = stub.GetType(zone(), map); | 204 *combined_type = stub.GetType(zone(), map); |
203 *left_type = *right_type = stub.GetInputType(zone(), map); | 205 *left_type = *right_type = stub.GetInputType(zone(), map); |
204 } | 206 } |
205 } | 207 } |
206 | 208 |
207 | 209 |
208 void TypeFeedbackOracle::BinaryType(TypeFeedbackId id, | 210 void TypeFeedbackOracle::BinaryType(TypeFeedbackId id, |
209 Type** left, | 211 Type** left, |
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
459 UnseededNumberDictionary::kNotFound); | 461 UnseededNumberDictionary::kNotFound); |
460 // Dictionary has been allocated with sufficient size for all elements. | 462 // Dictionary has been allocated with sufficient size for all elements. |
461 DisallowHeapAllocation no_need_to_resize_dictionary; | 463 DisallowHeapAllocation no_need_to_resize_dictionary; |
462 HandleScope scope(isolate()); | 464 HandleScope scope(isolate()); |
463 USE(UnseededNumberDictionary::AtNumberPut( | 465 USE(UnseededNumberDictionary::AtNumberPut( |
464 dictionary_, IdToKey(ast_id), handle(target, isolate()))); | 466 dictionary_, IdToKey(ast_id), handle(target, isolate()))); |
465 } | 467 } |
466 | 468 |
467 | 469 |
468 } } // namespace v8::internal | 470 } } // namespace v8::internal |
OLD | NEW |