Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(281)

Side by Side Diff: src/type-info.cc

Issue 409613002: Store both major and minor key on code stubs. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« src/objects.h ('K') | « src/stub-cache.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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.h" 10 #include "src/ic.h"
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 Handle<Map> map; 200 Handle<Map> map;
201 Map* raw_map = code->FindFirstMap(); 201 Map* raw_map = code->FindFirstMap();
202 if (raw_map != NULL) { 202 if (raw_map != NULL) {
203 if (Map::CurrentMapForDeprecated(handle(raw_map)).ToHandle(&map) && 203 if (Map::CurrentMapForDeprecated(handle(raw_map)).ToHandle(&map) &&
204 CanRetainOtherContext(*map, *native_context_)) { 204 CanRetainOtherContext(*map, *native_context_)) {
205 map = Handle<Map>::null(); 205 map = Handle<Map>::null();
206 } 206 }
207 } 207 }
208 208
209 if (code->is_compare_ic_stub()) { 209 if (code->is_compare_ic_stub()) {
210 int stub_minor_key = code->stub_info(); 210 CompareIC::StubInfoToType(code->stub_key(), left_type, right_type,
211 CompareIC::StubInfoToType( 211 combined_type, map, zone());
212 stub_minor_key, left_type, right_type, combined_type, map, zone());
213 } else if (code->is_compare_nil_ic_stub()) { 212 } else if (code->is_compare_nil_ic_stub()) {
214 CompareNilICStub stub(isolate(), code->extra_ic_state()); 213 CompareNilICStub stub(isolate(), code->extra_ic_state());
215 *combined_type = stub.GetType(zone(), map); 214 *combined_type = stub.GetType(zone(), map);
216 *left_type = *right_type = stub.GetInputType(zone(), map); 215 *left_type = *right_type = stub.GetInputType(zone(), map);
217 } 216 }
218 } 217 }
219 218
220 219
221 void TypeFeedbackOracle::BinaryType(TypeFeedbackId id, 220 void TypeFeedbackOracle::BinaryType(TypeFeedbackId id,
222 Type** left, 221 Type** left,
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
476 UnseededNumberDictionary::kNotFound); 475 UnseededNumberDictionary::kNotFound);
477 // Dictionary has been allocated with sufficient size for all elements. 476 // Dictionary has been allocated with sufficient size for all elements.
478 DisallowHeapAllocation no_need_to_resize_dictionary; 477 DisallowHeapAllocation no_need_to_resize_dictionary;
479 HandleScope scope(isolate()); 478 HandleScope scope(isolate());
480 USE(UnseededNumberDictionary::AtNumberPut( 479 USE(UnseededNumberDictionary::AtNumberPut(
481 dictionary_, IdToKey(ast_id), handle(target, isolate()))); 480 dictionary_, IdToKey(ast_id), handle(target, isolate())));
482 } 481 }
483 482
484 483
485 } } // namespace v8::internal 484 } } // namespace v8::internal
OLDNEW
« src/objects.h ('K') | « src/stub-cache.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698