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

Side by Side Diff: src/ic.cc

Issue 16578008: Improved function entry hook coverage (Closed) Base URL: https://chromium.googlesource.com/external/v8.git@post_fix
Patch Set: Remove reliance on space->Contains check, which is only valid for V8-allocated memory. Go to unsign… Created 7 years, 6 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
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 21 matching lines...) Expand all
32 #include "arguments.h" 32 #include "arguments.h"
33 #include "codegen.h" 33 #include "codegen.h"
34 #include "execution.h" 34 #include "execution.h"
35 #include "ic-inl.h" 35 #include "ic-inl.h"
36 #include "runtime.h" 36 #include "runtime.h"
37 #include "stub-cache.h" 37 #include "stub-cache.h"
38 38
39 namespace v8 { 39 namespace v8 {
40 namespace internal { 40 namespace internal {
41 41
42
danno 2013/06/25 18:40:35 Stray whitespace change?
Sigurður Ásgeirsson 2013/06/27 13:06:40 Oops, had some code there earlier, fixed.
42 #ifdef DEBUG 43 #ifdef DEBUG
43 char IC::TransitionMarkFromState(IC::State state) { 44 char IC::TransitionMarkFromState(IC::State state) {
44 switch (state) { 45 switch (state) {
45 case UNINITIALIZED: return '0'; 46 case UNINITIALIZED: return '0';
46 case PREMONOMORPHIC: return '.'; 47 case PREMONOMORPHIC: return '.';
47 case MONOMORPHIC: return '1'; 48 case MONOMORPHIC: return '1';
48 case MONOMORPHIC_PROTOTYPE_FAILURE: return '^'; 49 case MONOMORPHIC_PROTOTYPE_FAILURE: return '^';
49 case POLYMORPHIC: return 'P'; 50 case POLYMORPHIC: return 'P';
50 case MEGAMORPHIC: return 'N'; 51 case MEGAMORPHIC: return 'N';
51 case GENERIC: return 'G'; 52 case GENERIC: return 'G';
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 pc_address = reinterpret_cast<Address*>(fp + kCallerPCOffset); 138 pc_address = reinterpret_cast<Address*>(fp + kCallerPCOffset);
138 fp = Memory::Address_at(fp + StandardFrameConstants::kCallerFPOffset); 139 fp = Memory::Address_at(fp + StandardFrameConstants::kCallerFPOffset);
139 } 140 }
140 #ifdef DEBUG 141 #ifdef DEBUG
141 StackFrameIterator it(isolate); 142 StackFrameIterator it(isolate);
142 for (int i = 0; i < depth + 1; i++) it.Advance(); 143 for (int i = 0; i < depth + 1; i++) it.Advance();
143 StackFrame* frame = it.frame(); 144 StackFrame* frame = it.frame();
144 ASSERT(fp == frame->fp() && pc_address == frame->pc_address()); 145 ASSERT(fp == frame->fp() && pc_address == frame->pc_address());
145 #endif 146 #endif
146 fp_ = fp; 147 fp_ = fp;
147 pc_address_ = pc_address; 148 pc_address_ = StackFrame::ResolveReturnAddressLocation(pc_address);
148 } 149 }
149 150
150 151
151 #ifdef ENABLE_DEBUGGER_SUPPORT 152 #ifdef ENABLE_DEBUGGER_SUPPORT
152 Address IC::OriginalCodeAddress() const { 153 Address IC::OriginalCodeAddress() const {
153 HandleScope scope(isolate()); 154 HandleScope scope(isolate());
154 // Compute the JavaScript frame for the frame pointer of this IC 155 // Compute the JavaScript frame for the frame pointer of this IC
155 // structure. We need this to be able to find the function 156 // structure. We need this to be able to find the function
156 // corresponding to the frame. 157 // corresponding to the frame.
157 StackFrameIterator it(isolate()); 158 StackFrameIterator it(isolate());
(...skipping 2866 matching lines...) Expand 10 before | Expand all | Expand 10 after
3024 #undef ADDR 3025 #undef ADDR
3025 }; 3026 };
3026 3027
3027 3028
3028 Address IC::AddressFromUtilityId(IC::UtilityId id) { 3029 Address IC::AddressFromUtilityId(IC::UtilityId id) {
3029 return IC_utilities[id]; 3030 return IC_utilities[id];
3030 } 3031 }
3031 3032
3032 3033
3033 } } // namespace v8::internal 3034 } } // namespace v8::internal
OLDNEW
« src/bootstrapper.cc ('K') | « src/ia32/code-stubs-ia32.cc ('k') | src/isolate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698