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

Side by Side Diff: src/deoptimizer.cc

Issue 13932006: Replace OS::MemCopy with OS::MemMove (just as fast but more flexible). (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: addressed comments Created 7 years, 8 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/debug.cc ('k') | src/elements.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 2354 matching lines...) Expand 10 before | Expand all | Expand 10 after
2365 // The bits encode the sign in the least significant bit. 2365 // The bits encode the sign in the least significant bit.
2366 bool is_negative = (bits & 1) == 1; 2366 bool is_negative = (bits & 1) == 1;
2367 int32_t result = bits >> 1; 2367 int32_t result = bits >> 1;
2368 return is_negative ? -result : result; 2368 return is_negative ? -result : result;
2369 } 2369 }
2370 2370
2371 2371
2372 Handle<ByteArray> TranslationBuffer::CreateByteArray(Factory* factory) { 2372 Handle<ByteArray> TranslationBuffer::CreateByteArray(Factory* factory) {
2373 int length = contents_.length(); 2373 int length = contents_.length();
2374 Handle<ByteArray> result = factory->NewByteArray(length, TENURED); 2374 Handle<ByteArray> result = factory->NewByteArray(length, TENURED);
2375 memcpy(result->GetDataStartAddress(), contents_.ToVector().start(), length); 2375 OS::MemCopy(
2376 result->GetDataStartAddress(), contents_.ToVector().start(), length);
2376 return result; 2377 return result;
2377 } 2378 }
2378 2379
2379 2380
2380 void Translation::BeginConstructStubFrame(int literal_id, unsigned height) { 2381 void Translation::BeginConstructStubFrame(int literal_id, unsigned height) {
2381 buffer_->Add(CONSTRUCT_STUB_FRAME, zone()); 2382 buffer_->Add(CONSTRUCT_STUB_FRAME, zone());
2382 buffer_->Add(literal_id, zone()); 2383 buffer_->Add(literal_id, zone());
2383 buffer_->Add(height, zone()); 2384 buffer_->Add(height, zone());
2384 } 2385 }
2385 2386
(...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after
2771 2772
2772 void DeoptimizedFrameInfo::Iterate(ObjectVisitor* v) { 2773 void DeoptimizedFrameInfo::Iterate(ObjectVisitor* v) {
2773 v->VisitPointer(BitCast<Object**>(&function_)); 2774 v->VisitPointer(BitCast<Object**>(&function_));
2774 v->VisitPointers(parameters_, parameters_ + parameters_count_); 2775 v->VisitPointers(parameters_, parameters_ + parameters_count_);
2775 v->VisitPointers(expression_stack_, expression_stack_ + expression_count_); 2776 v->VisitPointers(expression_stack_, expression_stack_ + expression_count_);
2776 } 2777 }
2777 2778
2778 #endif // ENABLE_DEBUGGER_SUPPORT 2779 #endif // ENABLE_DEBUGGER_SUPPORT
2779 2780
2780 } } // namespace v8::internal 2781 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/debug.cc ('k') | src/elements.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698