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

Side by Side Diff: src/ic.cc

Issue 19785004: Move FindCodeObject from Heap to Isolate. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 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
« no previous file with comments | « src/heap.cc ('k') | src/isolate.h » ('j') | 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 // 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 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 if (receiver->IsJSBuiltinsObject()) { 286 if (receiver->IsJSBuiltinsObject()) {
287 return UNINITIALIZED; 287 return UNINITIALIZED;
288 } 288 }
289 289
290 return MONOMORPHIC; 290 return MONOMORPHIC;
291 } 291 }
292 292
293 293
294 RelocInfo::Mode IC::ComputeMode() { 294 RelocInfo::Mode IC::ComputeMode() {
295 Address addr = address(); 295 Address addr = address();
296 Code* code = Code::cast(isolate()->heap()->FindCodeObject(addr)); 296 Code* code = Code::cast(isolate()->FindCodeObject(addr));
297 for (RelocIterator it(code, RelocInfo::kCodeTargetMask); 297 for (RelocIterator it(code, RelocInfo::kCodeTargetMask);
298 !it.done(); it.next()) { 298 !it.done(); it.next()) {
299 RelocInfo* info = it.rinfo(); 299 RelocInfo* info = it.rinfo();
300 if (info->pc() == addr) return info->rmode(); 300 if (info->pc() == addr) return info->rmode();
301 } 301 }
302 UNREACHABLE(); 302 UNREACHABLE();
303 return RelocInfo::NONE32; 303 return RelocInfo::NONE32;
304 } 304 }
305 305
306 306
(...skipping 2808 matching lines...) Expand 10 before | Expand all | Expand 10 after
3115 #undef ADDR 3115 #undef ADDR
3116 }; 3116 };
3117 3117
3118 3118
3119 Address IC::AddressFromUtilityId(IC::UtilityId id) { 3119 Address IC::AddressFromUtilityId(IC::UtilityId id) {
3120 return IC_utilities[id]; 3120 return IC_utilities[id];
3121 } 3121 }
3122 3122
3123 3123
3124 } } // namespace v8::internal 3124 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/heap.cc ('k') | src/isolate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698