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

Side by Side Diff: src/code-stubs.cc

Issue 12451003: Make IC patching resilient to flushing of the original target() ic. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments Created 7 years, 9 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/code-stubs.h ('k') | src/ia32/ic-ia32.cc » ('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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 94
95 // Create the code object. 95 // Create the code object.
96 CodeDesc desc; 96 CodeDesc desc;
97 masm.GetCode(&desc); 97 masm.GetCode(&desc);
98 98
99 // Copy the generated code into a heap object. 99 // Copy the generated code into a heap object.
100 Code::Flags flags = Code::ComputeFlags( 100 Code::Flags flags = Code::ComputeFlags(
101 static_cast<Code::Kind>(GetCodeKind()), 101 static_cast<Code::Kind>(GetCodeKind()),
102 GetICState(), 102 GetICState(),
103 GetExtraICState(), 103 GetExtraICState(),
104 GetStubType()); 104 GetStubType(),
105 GetStubFlags());
105 Handle<Code> new_object = factory->NewCode( 106 Handle<Code> new_object = factory->NewCode(
106 desc, flags, masm.CodeObject(), NeedsImmovableCode()); 107 desc, flags, masm.CodeObject(), NeedsImmovableCode());
107 return new_object; 108 return new_object;
108 } 109 }
109 110
110 111
111 Handle<Code> CodeStub::GetCode(Isolate* isolate) { 112 Handle<Code> CodeStub::GetCode(Isolate* isolate) {
112 Factory* factory = isolate->factory(); 113 Factory* factory = isolate->factory();
113 Heap* heap = isolate->heap(); 114 Heap* heap = isolate->heap();
114 Code* code; 115 Code* code;
(...skipping 520 matching lines...) Expand 10 before | Expand all | Expand 10 after
635 // already active, as the hooks won't stack. 636 // already active, as the hooks won't stack.
636 if (entry_hook != 0 && entry_hook_ != 0) 637 if (entry_hook != 0 && entry_hook_ != 0)
637 return false; 638 return false;
638 639
639 entry_hook_ = entry_hook; 640 entry_hook_ = entry_hook;
640 return true; 641 return true;
641 } 642 }
642 643
643 644
644 } } // namespace v8::internal 645 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/code-stubs.h ('k') | src/ia32/ic-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698