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

Side by Side Diff: src/x64/assembler-x64.cc

Issue 3970005: Make Failure inherit from MaybeObject instead of Object. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 years, 1 month 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/top.cc ('k') | src/x64/macro-assembler-x64.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 2009 the V8 project authors. All rights reserved. 1 // Copyright 2009 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 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 __ movq(rsp, rbp); 111 __ movq(rsp, rbp);
112 __ pop(rbx); 112 __ pop(rbx);
113 __ pop(rcx); 113 __ pop(rcx);
114 __ popfq(); 114 __ popfq();
115 __ pop(rbp); 115 __ pop(rbp);
116 __ ret(0); 116 __ ret(0);
117 #undef __ 117 #undef __
118 118
119 CodeDesc desc; 119 CodeDesc desc;
120 assm.GetCode(&desc); 120 assm.GetCode(&desc);
121 Object* code = Heap::CreateCode(desc, 121 MaybeObject* maybe_code = Heap::CreateCode(desc,
122 Code::ComputeFlags(Code::STUB), 122 Code::ComputeFlags(Code::STUB),
123 Handle<Object>()); 123 Handle<Object>());
124 Object* code;
125 if (!maybe_code->ToObject(&code)) return;
124 if (!code->IsCode()) return; 126 if (!code->IsCode()) return;
125 PROFILE(CodeCreateEvent(Logger::BUILTIN_TAG, 127 PROFILE(CodeCreateEvent(Logger::BUILTIN_TAG,
126 Code::cast(code), "CpuFeatures::Probe")); 128 Code::cast(code), "CpuFeatures::Probe"));
127 typedef uint64_t (*F0)(); 129 typedef uint64_t (*F0)();
128 F0 probe = FUNCTION_CAST<F0>(Code::cast(code)->entry()); 130 F0 probe = FUNCTION_CAST<F0>(Code::cast(code)->entry());
129 supported_ = probe(); 131 supported_ = probe();
130 found_by_runtime_probing_ = supported_; 132 found_by_runtime_probing_ = supported_;
131 found_by_runtime_probing_ &= ~kDefaultCpuFeatures; 133 found_by_runtime_probing_ &= ~kDefaultCpuFeatures;
132 uint64_t os_guarantees = OS::CpuFeaturesImpliedByPlatform(); 134 uint64_t os_guarantees = OS::CpuFeaturesImpliedByPlatform();
133 supported_ |= os_guarantees; 135 supported_ |= os_guarantees;
(...skipping 2870 matching lines...) Expand 10 before | Expand all | Expand 10 after
3004 // specially coded on x64 means that it is a relative 32 bit address, as used 3006 // specially coded on x64 means that it is a relative 32 bit address, as used
3005 // by branch instructions. 3007 // by branch instructions.
3006 return (1 << rmode_) & kApplyMask; 3008 return (1 << rmode_) & kApplyMask;
3007 } 3009 }
3008 3010
3009 3011
3010 3012
3011 } } // namespace v8::internal 3013 } } // namespace v8::internal
3012 3014
3013 #endif // V8_TARGET_ARCH_X64 3015 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/top.cc ('k') | src/x64/macro-assembler-x64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698