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

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

Issue 6970001: Code should be retrieved via the AST id, not via the source position. Bugs like (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 9 years, 7 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
« no previous file with comments | « no previous file | 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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 // TODO(kasperl): We really need a type for JS objects here. 233 // TODO(kasperl): We really need a type for JS objects here.
234 return TypeInfo::NonPrimitive(); 234 return TypeInfo::NonPrimitive();
235 case CompareIC::GENERIC: 235 case CompareIC::GENERIC:
236 default: 236 default:
237 return unknown; 237 return unknown;
238 } 238 }
239 } 239 }
240 240
241 241
242 TypeInfo TypeFeedbackOracle::UnaryType(UnaryOperation* expr) { 242 TypeInfo TypeFeedbackOracle::UnaryType(UnaryOperation* expr) {
243 Handle<Object> object = GetInfo(expr->position()); 243 Handle<Object> object = GetInfo(expr->id());
244 TypeInfo unknown = TypeInfo::Unknown(); 244 TypeInfo unknown = TypeInfo::Unknown();
245 if (!object->IsCode()) return unknown; 245 if (!object->IsCode()) return unknown;
246 Handle<Code> code = Handle<Code>::cast(object); 246 Handle<Code> code = Handle<Code>::cast(object);
247 ASSERT(code->is_type_recording_unary_op_stub()); 247 ASSERT(code->is_type_recording_unary_op_stub());
248 TRUnaryOpIC::TypeInfo type = static_cast<TRUnaryOpIC::TypeInfo>( 248 TRUnaryOpIC::TypeInfo type = static_cast<TRUnaryOpIC::TypeInfo>(
249 code->type_recording_unary_op_type()); 249 code->type_recording_unary_op_type());
250 switch (type) { 250 switch (type) {
251 case TRUnaryOpIC::SMI: 251 case TRUnaryOpIC::SMI:
252 return TypeInfo::Smi(); 252 return TypeInfo::Smi();
253 case TRUnaryOpIC::HEAP_NUMBER: 253 case TRUnaryOpIC::HEAP_NUMBER:
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
483 static_cast<int>(info->pc() - code->instruction_start())); 483 static_cast<int>(info->pc() - code->instruction_start()));
484 ASSERT(ast_ids->length() == 0 || 484 ASSERT(ast_ids->length() == 0 ||
485 (*ast_ids)[ast_ids->length()-1] != 485 (*ast_ids)[ast_ids->length()-1] !=
486 static_cast<unsigned>(info->data())); 486 static_cast<unsigned>(info->data()));
487 ast_ids->Add(static_cast<unsigned>(info->data())); 487 ast_ids->Add(static_cast<unsigned>(info->data()));
488 } 488 }
489 } 489 }
490 } 490 }
491 491
492 } } // namespace v8::internal 492 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698