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

Side by Side Diff: src/x64/virtual-frame-x64.cc

Issue 1277001: Store type information with constants. ... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 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/register-allocator-inl.h ('k') | tools/gyp/v8.gyp » ('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 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 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 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 void VirtualFrame::EmitPush(Smi* smi_value) { 204 void VirtualFrame::EmitPush(Smi* smi_value) {
205 ASSERT(stack_pointer_ == element_count() - 1); 205 ASSERT(stack_pointer_ == element_count() - 1);
206 elements_.Add(FrameElement::MemoryElement(NumberInfo::Smi())); 206 elements_.Add(FrameElement::MemoryElement(NumberInfo::Smi()));
207 stack_pointer_++; 207 stack_pointer_++;
208 __ Push(smi_value); 208 __ Push(smi_value);
209 } 209 }
210 210
211 211
212 void VirtualFrame::EmitPush(Handle<Object> value) { 212 void VirtualFrame::EmitPush(Handle<Object> value) {
213 ASSERT(stack_pointer_ == element_count() - 1); 213 ASSERT(stack_pointer_ == element_count() - 1);
214 NumberInfo info = NumberInfo::Unknown(); 214 NumberInfo info = NumberInfo::TypeFromValue(value);
215 if (value->IsSmi()) {
216 info = NumberInfo::Smi();
217 } else if (value->IsHeapNumber()) {
218 info = NumberInfo::HeapNumber();
219 }
220 elements_.Add(FrameElement::MemoryElement(info)); 215 elements_.Add(FrameElement::MemoryElement(info));
221 stack_pointer_++; 216 stack_pointer_++;
222 __ Push(value); 217 __ Push(value);
223 } 218 }
224 219
225 220
226 void VirtualFrame::EmitPush(Heap::RootListIndex index, NumberInfo info) { 221 void VirtualFrame::EmitPush(Heap::RootListIndex index, NumberInfo info) {
227 ASSERT(stack_pointer_ == element_count() - 1); 222 ASSERT(stack_pointer_ == element_count() - 1);
228 elements_.Add(FrameElement::MemoryElement(info)); 223 elements_.Add(FrameElement::MemoryElement(info));
229 stack_pointer_++; 224 stack_pointer_++;
(...skipping 887 matching lines...) Expand 10 before | Expand all | Expand 10 after
1117 // Grow the expression stack by handler size less one (the return 1112 // Grow the expression stack by handler size less one (the return
1118 // address is already pushed by a call instruction). 1113 // address is already pushed by a call instruction).
1119 Adjust(kHandlerSize - 1); 1114 Adjust(kHandlerSize - 1);
1120 __ PushTryHandler(IN_JAVASCRIPT, type); 1115 __ PushTryHandler(IN_JAVASCRIPT, type);
1121 } 1116 }
1122 1117
1123 1118
1124 #undef __ 1119 #undef __
1125 1120
1126 } } // namespace v8::internal 1121 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/register-allocator-inl.h ('k') | tools/gyp/v8.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698