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

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

Issue 7891042: Add asserts to ensure that we: (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 9 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/code-stubs.h ('k') | src/deoptimizer.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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 return true; 45 return true;
46 } 46 }
47 return false; 47 return false;
48 } 48 }
49 49
50 50
51 void CodeStub::GenerateCode(MacroAssembler* masm) { 51 void CodeStub::GenerateCode(MacroAssembler* masm) {
52 // Update the static counter each time a new code stub is generated. 52 // Update the static counter each time a new code stub is generated.
53 masm->isolate()->counters()->code_stubs()->Increment(); 53 masm->isolate()->counters()->code_stubs()->Increment();
54 54
55 // Nested stubs are not allowed for leafs. 55 // Nested stubs are not allowed for leaves.
56 AllowStubCallsScope allow_scope(masm, AllowsStubCalls()); 56 AllowStubCallsScope allow_scope(masm, false);
57 57
58 // Generate the code for the stub. 58 // Generate the code for the stub.
59 masm->set_generating_stub(true); 59 masm->set_generating_stub(true);
60 NoCurrentFrameScope scope(masm);
60 Generate(masm); 61 Generate(masm);
61 } 62 }
62 63
63 64
64 SmartArrayPointer<const char> CodeStub::GetName() { 65 SmartArrayPointer<const char> CodeStub::GetName() {
65 char buffer[100]; 66 char buffer[100];
66 NoAllocationStringAllocator allocator(buffer, 67 NoAllocationStringAllocator allocator(buffer,
67 static_cast<unsigned>(sizeof(buffer))); 68 static_cast<unsigned>(sizeof(buffer)));
68 StringStream stream(&allocator); 69 StringStream stream(&allocator);
69 PrintName(&stream); 70 PrintName(&stream);
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after
396 } 397 }
397 398
398 399
399 bool ToBooleanStub::Types::CanBeUndetectable() const { 400 bool ToBooleanStub::Types::CanBeUndetectable() const {
400 return Contains(ToBooleanStub::SPEC_OBJECT) 401 return Contains(ToBooleanStub::SPEC_OBJECT)
401 || Contains(ToBooleanStub::STRING); 402 || Contains(ToBooleanStub::STRING);
402 } 403 }
403 404
404 405
405 } } // namespace v8::internal 406 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/code-stubs.h ('k') | src/deoptimizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698