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

Side by Side Diff: src/codegen.cc

Issue 3311002: Remove CodeGenerator::PatchInlineRuntimeEntry and replace its single use in t... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 years, 3 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/codegen.h ('k') | src/ia32/codegen-ia32.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 367 matching lines...) Expand 10 before | Expand all | Expand 10 after
378 InlineRuntimeLUT* entry = FindInlineRuntimeLUT(name); 378 InlineRuntimeLUT* entry = FindInlineRuntimeLUT(name);
379 if (entry != NULL) { 379 if (entry != NULL) {
380 ((*this).*(entry->method))(args); 380 ((*this).*(entry->method))(args);
381 return true; 381 return true;
382 } 382 }
383 } 383 }
384 return false; 384 return false;
385 } 385 }
386 386
387 387
388 bool CodeGenerator::PatchInlineRuntimeEntry(Handle<String> name,
389 const CodeGenerator::InlineRuntimeLUT& new_entry,
390 CodeGenerator::InlineRuntimeLUT* old_entry) {
391 InlineRuntimeLUT* entry = FindInlineRuntimeLUT(name);
392 if (entry == NULL) return false;
393 if (old_entry != NULL) {
394 old_entry->name = entry->name;
395 old_entry->method = entry->method;
396 }
397 entry->name = new_entry.name;
398 entry->method = new_entry.method;
399 return true;
400 }
401
402
403 int CodeGenerator::InlineRuntimeCallArgumentsCount(Handle<String> name) { 388 int CodeGenerator::InlineRuntimeCallArgumentsCount(Handle<String> name) {
404 CodeGenerator::InlineRuntimeLUT* f = 389 CodeGenerator::InlineRuntimeLUT* f =
405 CodeGenerator::FindInlineRuntimeLUT(name); 390 CodeGenerator::FindInlineRuntimeLUT(name);
406 if (f != NULL) return f->nargs; 391 if (f != NULL) return f->nargs;
407 return -1; 392 return -1;
408 } 393 }
409 394
410 395
411 // Simple condition analysis. ALWAYS_TRUE and ALWAYS_FALSE represent a 396 // Simple condition analysis. ALWAYS_TRUE and ALWAYS_FALSE represent a
412 // known result for the test expression, with no side effects. 397 // known result for the test expression, with no side effects.
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
520 } 505 }
521 } 506 }
522 507
523 508
524 void ApiGetterEntryStub::SetCustomCache(Code* value) { 509 void ApiGetterEntryStub::SetCustomCache(Code* value) {
525 info()->set_load_stub_cache(value); 510 info()->set_load_stub_cache(value);
526 } 511 }
527 512
528 513
529 } } // namespace v8::internal 514 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/codegen.h ('k') | src/ia32/codegen-ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698